diff --git a/MediaBrowser.Dlna/DlnaManager.cs b/MediaBrowser.Dlna/DlnaManager.cs index 5f4c34bb77..aae157e7a8 100644 --- a/MediaBrowser.Dlna/DlnaManager.cs +++ b/MediaBrowser.Dlna/DlnaManager.cs @@ -206,7 +206,6 @@ namespace MediaBrowser.Dlna throw new ArgumentNullException("headers"); } - //_logger.Debug("GetProfile. Headers: " + _jsonSerializer.SerializeToString(headers)); // Convert to case insensitive headers = new Dictionary(headers, StringComparer.OrdinalIgnoreCase); @@ -218,16 +217,12 @@ namespace MediaBrowser.Dlna } else { - string userAgent = null; - headers.TryGetValue("User-Agent", out userAgent); - - var msg = "No matching device profile via headers found. The default will be used. "; - if (!string.IsNullOrEmpty(userAgent)) + var msg = new StringBuilder(); + foreach (var header in headers) { - msg += "User-agent: " + userAgent + ". "; + msg.AppendLine(header.Key + ": " + header.Value); } - - _logger.Debug(msg); + _logger.LogMultiline("No matching device profile found. The default will need to be used.", LogSeverity.Info, msg); } return profile; diff --git a/MediaBrowser.Dlna/PlayTo/PlayToController.cs b/MediaBrowser.Dlna/PlayTo/PlayToController.cs index 913b34016d..5622885fc7 100644 --- a/MediaBrowser.Dlna/PlayTo/PlayToController.cs +++ b/MediaBrowser.Dlna/PlayTo/PlayToController.cs @@ -221,7 +221,7 @@ namespace MediaBrowser.Dlna.PlayTo { await _sessionManager.OnPlaybackStopped(new PlaybackStopInfo { - ItemId = mediaInfo.Id, + ItemId = streamInfo.ItemId, SessionId = _session.Id, PositionTicks = positionTicks, MediaSourceId = streamInfo.MediaSourceId diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs index ad9549a2fc..b3535b0e9e 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013.cs @@ -12,8 +12,6 @@ namespace MediaBrowser.Dlna.Profiles Identification = new DeviceIdentification { - FriendlyName = @"Blu-ray Disc Player", - Manufacturer = "Sony", ModelNumber = "BDP-2013" }; @@ -36,9 +34,9 @@ namespace MediaBrowser.Dlna.Profiles new TranscodingProfile { - Container = "ts", + Container = "mkv", VideoCodec = "h264", - AudioCodec = "ac3", + AudioCodec = "ac3,aac,mp3", Type = DlnaProfileType.Video }, @@ -53,21 +51,21 @@ namespace MediaBrowser.Dlna.Profiles { new DirectPlayProfile { - Container = "ts", + Container = "ts,mpegts", VideoCodec = "mpeg1video,mpeg2video,h264", AudioCodec = "ac3,aac,mp3,pcm", Type = DlnaProfileType.Video }, new DirectPlayProfile { - Container = "mpeg", + Container = "mpeg,mpg", VideoCodec = "mpeg1video,mpeg2video", AudioCodec = "ac3,mp3,mp2,pcm", Type = DlnaProfileType.Video }, new DirectPlayProfile { - Container = "mp4", + Container = "mp4,m4v", VideoCodec = "mpeg4,h264", AudioCodec = "ac3,aac,pcm,mp3", Type = DlnaProfileType.Video @@ -88,25 +86,24 @@ namespace MediaBrowser.Dlna.Profiles }, new DirectPlayProfile { - Container = "mp3", - AudioCodec = "mp3", + Container = "m2ts,mts", + VideoCodec = "h264,mpeg4,vc1", + AudioCodec = "aac,mp3,ac3,dca,dts", + Type = DlnaProfileType.Video + }, + new DirectPlayProfile + { + Container = "wmv,asf", + Type = DlnaProfileType.Video + }, + new DirectPlayProfile + { + Container = "mp3,m4a,wma,wav", Type = DlnaProfileType.Audio }, new DirectPlayProfile { - Container = "mp4", - AudioCodec = "aac", - Type = DlnaProfileType.Audio - }, - new DirectPlayProfile - { - Container = "asf", - AudioCodec = "wmav2,wmapro,wmavoice", - Type = DlnaProfileType.Audio - }, - new DirectPlayProfile - { - Container = "jpeg", + Container = "jpeg,png,gif", Type = DlnaProfileType.Photo } }; diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs index 93e3a20d04..45fa1d0e67 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2014.cs @@ -12,8 +12,6 @@ namespace MediaBrowser.Dlna.Profiles Identification = new DeviceIdentification { - FriendlyName = @"Blu-ray Disc Player", - Manufacturer = "Sony", ModelNumber = "BDP-2014" }; @@ -36,9 +34,9 @@ namespace MediaBrowser.Dlna.Profiles new TranscodingProfile { - Container = "ts", + Container = "mkv", VideoCodec = "h264", - AudioCodec = "ac3", + AudioCodec = "ac3,aac,mp3", Type = DlnaProfileType.Video }, diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs index f469bde02f..6295cd40f9 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2015.cs @@ -12,8 +12,6 @@ namespace MediaBrowser.Dlna.Profiles Identification = new DeviceIdentification { - FriendlyName = @"Blu-ray Disc Player", - Manufacturer = "Sony", ModelNumber = "BDP-2015" }; @@ -36,9 +34,9 @@ namespace MediaBrowser.Dlna.Profiles new TranscodingProfile { - Container = "ts", + Container = "mkv", VideoCodec = "h264", - AudioCodec = "ac3", + AudioCodec = "ac3,aac,mp3", Type = DlnaProfileType.Video }, diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs index 662e2418f7..5f1f1cf5f4 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2016.cs @@ -12,9 +12,17 @@ namespace MediaBrowser.Dlna.Profiles Identification = new DeviceIdentification { - FriendlyName = @"Blu-ray Disc Player", - Manufacturer = "Sony", - ModelNumber = "BDP-2016" + ModelNumber = "BDP-2016", + + Headers = new[] + { + new HttpHeaderInfo + { + Name = "X-AV-Physical-Unit-Info", + Value = "BDP-S3700", + Match = HeaderMatchType.Substring + } + } }; AddXmlRootAttribute("xmlns:av", "urn:schemas-sony-com:av"); @@ -36,9 +44,9 @@ namespace MediaBrowser.Dlna.Profiles new TranscodingProfile { - Container = "ts", + Container = "mkv", VideoCodec = "h264", - AudioCodec = "ac3", + AudioCodec = "ac3,aac,mp3", Type = DlnaProfileType.Video }, diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml index 4f2db34e58..32a79ec558 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml @@ -2,9 +2,7 @@ Sony Blu-ray Player 2013 - Blu-ray Disc Player BDP-2013 - Sony Microsoft Corporation @@ -37,19 +35,19 @@ - - - + + + - - - - + + + + - + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml index 468a6dd13a..fa9914953e 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml @@ -2,9 +2,7 @@ Sony Blu-ray Player 2014 - Blu-ray Disc Player BDP-2014 - Sony Microsoft Corporation @@ -49,7 +47,7 @@ - + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml index ac356765e8..5d0904f451 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml @@ -2,9 +2,7 @@ Sony Blu-ray Player 2015 - Blu-ray Disc Player BDP-2015 - Sony Microsoft Corporation @@ -49,7 +47,7 @@ - + diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml index 0b7ca9922e..910efbd11e 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml @@ -2,10 +2,10 @@ Sony Blu-ray Player 2016 - Blu-ray Disc Player BDP-2016 - Sony - + + + Microsoft Corporation http://emby.media/ @@ -49,7 +49,7 @@ - +