The Free Software Media System - Server Backend & API
ps4 dlna fixes
Luke Pulverenti14af8211ebe8
diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.csindex 3e47362f65..8771681ad7 100644--- a/Emby.Dlna/Didl/DidlBuilder.cs+++ b/Emby.Dlna/Didl/DidlBuilder.cs@@ -176,6 +176,18 @@ namespace Emby.Dlna.Didlreturn new NullLogger();}+ private string GetMimeType(string input)+ {+ var mime = MimeTypes.GetMimeType(input);++ if (string.Equals(mime, "video/mp2t", StringComparison.OrdinalIgnoreCase))+ {+ mime = "video/mpeg";+ }++ return mime;+ }+private void AddVideoResource(DlnaOptions options, XmlWriter writer, IHasMediaSources video, string deviceId, Filter filter, StreamInfo streamInfo = null){if (streamInfo == null)@@ -360,7 +372,7 @@ namespace Emby.Dlna.Didlvar filename = url.Substring(0, url.IndexOf('?'));var mimeType = mediaProfile == null || string.IsNullOrEmpty(mediaProfile.MimeType)- ? MimeTypes.GetMimeType(filename)+ ? GetMimeType(filename): mediaProfile.MimeType;writer.WriteAttributeString("protocolInfo", String.Format(@@ -481,7 +493,7 @@ namespace Emby.Dlna.Didlvar filename = url.Substring(0, url.IndexOf('?'));var mimeType = mediaProfile == null || string.IsNullOrEmpty(mediaProfile.MimeType)- ? MimeTypes.GetMimeType(filename)+ ? GetMimeType(filename): mediaProfile.MimeType;var contentFeatures = new ContentFeatureBuilder(_profile).BuildAudioHeader(streamInfo.Container,@@ -760,7 +772,7 @@ namespace Emby.Dlna.Didl// Seeing some LG models locking up due content with large lists of people// The actual issue might just be due to processing a more metadata than it can handle- var limit = 10;+ var limit = 6;foreach (var actor in people){@@ -1007,7 +1019,7 @@ namespace Emby.Dlna.Didlwriter.WriteAttributeString("protocolInfo", String.Format("http-get:*:{0}:{1}",- MimeTypes.GetMimeType("file." + format),+ GetMimeType("file." + format),contentFeatures));diff --git a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs b/Emby.Dlna/Profiles/DishHopperJoeyProfile.csindex d494a7bfca..63082f8caf 100644--- a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs+++ b/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs@@ -63,22 +63,7 @@ namespace Emby.Dlna.Profilesnew DirectPlayProfile{- Container = "mp3",- AudioCodec = "mp3",- Type = DlnaProfileType.Audio- },-- new DirectPlayProfile- {- Container = "alac",- AudioCodec = "alac",- Type = DlnaProfileType.Audio- },-- new DirectPlayProfile- {- Container = "flac",- AudioCodec = "flac",+ Container = "mp3,alac,flac",Type = DlnaProfileType.Audio},diff --git a/Emby.Dlna/Profiles/SonyPs4Profile.cs b/Emby.Dlna/Profiles/SonyPs4Profile.csindex 44649911dc..bcb47486cc 100644--- a/Emby.Dlna/Profiles/SonyPs4Profile.cs+++ b/Emby.Dlna/Profiles/SonyPs4Profile.cs@@ -86,7 +86,9 @@ namespace Emby.Dlna.Profiles{Container = "mp3",AudioCodec = "mp3",- Type = DlnaProfileType.Audio+ Type = DlnaProfileType.Audio,+ // Transcoded audio won't be playable at all without this+ TranscodeSeekInfo = TranscodeSeekInfo.Bytes},new TranscodingProfile{diff --git a/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml b/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xmlindex eb63352a3f..561ab35b7a 100644--- a/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml+++ b/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml@@ -37,9 +37,7 @@<XmlRootAttributes /><DirectPlayProfiles><DirectPlayProfile container="mp4,mkv,mpeg,ts" audioCodec="mp3,ac3,aac,he-aac,pcm" videoCodec="h264,mpeg2video" type="Video" />- <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />- <DirectPlayProfile container="alac" audioCodec="alac" type="Audio" />- <DirectPlayProfile container="flac" audioCodec="flac" type="Audio" />+ <DirectPlayProfile container="mp3,alac,flac" type="Audio" /><DirectPlayProfile container="jpeg" type="Photo" /></DirectPlayProfiles><TranscodingProfiles>diff --git a/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml b/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xmlindex 7ec4ccc907..d4eeaf80d0 100644--- a/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml+++ b/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml@@ -45,7 +45,7 @@<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" /></DirectPlayProfiles><TranscodingProfiles>- <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" />+ <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" /><TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" /><TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" enableSubtitlesInManifest="false" /></TranscodingProfiles>