aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-02 00:32:37 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-01-02 00:32:37 -0500
commit14af8211ebe84a75df7692819e5e670eaef5cd62 (patch)
tree18fd9f05783701bb3ced07b9ffc33da4506e9ffd
parentea61c6458f09018965fb84f4e29f527059400700 (diff)
ps4 dlna fixes
-rw-r--r--Emby.Dlna/Didl/DidlBuilder.cs20
-rw-r--r--Emby.Dlna/Profiles/DishHopperJoeyProfile.cs17
-rw-r--r--Emby.Dlna/Profiles/SonyPs4Profile.cs4
-rw-r--r--Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml4
-rw-r--r--Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml2
5 files changed, 22 insertions, 25 deletions
diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs
index 3e47362f6..8771681ad 100644
--- a/Emby.Dlna/Didl/DidlBuilder.cs
+++ b/Emby.Dlna/Didl/DidlBuilder.cs
@@ -176,6 +176,18 @@ namespace Emby.Dlna.Didl
return 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.Didl
var 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.Didl
var 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.Didl
writer.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.cs
index d494a7bfc..63082f8ca 100644
--- a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs
+++ b/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs
@@ -63,22 +63,7 @@ namespace Emby.Dlna.Profiles
new 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.cs
index 44649911d..bcb47486c 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.xml
index eb63352a3..561ab35b7 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.xml
index 7ec4ccc90..d4eeaf80d 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>