The Free Software Media System - Server Backend & API
Fix DLNA DirectPlay
Shadowghost4e91c3ebdc24
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.csindex 93b0a454cc..8671e5cbbf 100644--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs@@ -664,7 +664,7 @@ namespace MediaBrowser.Model.Dlna}}- _logger.LogInformation(+ _logger.LogDebug("DirectPlay Result for Profile: {0}, Path: {1}, PlayMethod: {2}, AudioStreamIndex: {3}, SubtitleStreamIndex: {4}, Reasons: {5}",options.Profile.Name ?? "Anonymous Profile",item.Path ?? "Unknown path",@@ -796,7 +796,7 @@ namespace MediaBrowser.Model.DlnaplaylistItem.SetOption(qualifier, "level", videoStream.Level.ToString());}- // prefer matching audio codecs, could do beter here+ // prefer matching audio codecs, could do better herevar audioCodecs = ContainerProfile.SplitValue(audioCodec);var directAudioStream = candidateAudioStreams.FirstOrDefault(stream => ContainerProfile.ContainsContainer(audioCodecs, stream.Codec));playlistItem.AudioCodecs = audioCodecs;@@ -908,7 +908,7 @@ namespace MediaBrowser.Model.DlnaplaylistItem.VideoBitrate = Math.Max(Math.Min(availableBitrateForVideo, currentValue), 64_000);}- _logger.LogInformation(+ _logger.LogDebug("Transcode Result for Profile: {Profile}, Path: {Path}, PlayMethod: {PlayMethod}, AudioStreamIndex: {AudioStreamIndex}, SubtitleStreamIndex: {SubtitleStreamIndex}, Reasons: {TranscodeReason}",options.Profile?.Name ?? "Anonymous Profile",item.Path ?? "Unknown path",diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.csindex 79dfff5c24..da089602f1 100644--- a/MediaBrowser.Model/Dlna/StreamInfo.cs+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs@@ -598,11 +598,6 @@ namespace MediaBrowser.Model.Dlnapublic string ToUrl(string baseUrl, string accessToken){- if (PlayMethod == PlayMethod.DirectPlay)- {- return MediaSource.Path;- }-if (string.IsNullOrEmpty(baseUrl)){throw new ArgumentNullException(nameof(baseUrl));