diff options
| author | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-04-01 23:09:55 +0200 |
|---|---|---|
| committer | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-04-01 23:09:55 +0200 |
| commit | 123bfbcf19a06bc45f13ff0c25b1f34a5d9f94b8 (patch) | |
| tree | d19446e7f253a04a2e5e412a2b33fbef09211135 /MediaBrowser.Api/Playback/MediaInfoService.cs | |
| parent | 41de0bd24569341199a7caed21469b7813d3c98d (diff) | |
| parent | cc40f84f3c138e439318e400eeb53cbb74eb8a84 (diff) | |
Merge remote-tracking branch 'upstream/master' into use-development-exception-page
Diffstat (limited to 'MediaBrowser.Api/Playback/MediaInfoService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/MediaInfoService.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs index 2aa5e2df1..d74ec3ca6 100644 --- a/MediaBrowser.Api/Playback/MediaInfoService.cs +++ b/MediaBrowser.Api/Playback/MediaInfoService.cs @@ -5,8 +5,8 @@ using System; using System.Buffers; using System.Globalization; -using System.Text.Json; using System.Linq; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.Net; @@ -470,7 +470,7 @@ namespace MediaBrowser.Api.Playback else { options.MaxBitrate = GetMaxBitrate(maxBitrate, user); - + if (item is Audio) { if (!user.Policy.EnableAudioPlaybackTranscoding) @@ -486,10 +486,10 @@ namespace MediaBrowser.Api.Playback } } - // The MediaSource supports direct stream, now test to see if the client supports it - var streamInfo = string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase) - ? streamBuilder.BuildAudioItem(options) - : streamBuilder.BuildVideoItem(options); + // The MediaSource supports direct stream, now test to see if the client supports it + var streamInfo = string.Equals(item.MediaType, MediaType.Audio, StringComparison.OrdinalIgnoreCase) + ? streamBuilder.BuildAudioItem(options) + : streamBuilder.BuildVideoItem(options); if (streamInfo == null || !streamInfo.IsDirectStream) { @@ -516,7 +516,7 @@ namespace MediaBrowser.Api.Playback { if (streamInfo != null) { - streamInfo.PlaySessionId = playSessionId; + streamInfo.PlaySessionId = playSessionId; streamInfo.StartPositionTicks = startTimeTicks; mediaSource.TranscodingUrl = streamInfo.ToUrl("-", auth.Token).TrimStart('-'); mediaSource.TranscodingUrl += "&allowVideoStreamCopy=false"; @@ -526,10 +526,10 @@ namespace MediaBrowser.Api.Playback } mediaSource.TranscodingContainer = streamInfo.Container; mediaSource.TranscodingSubProtocol = streamInfo.SubProtocol; - + // Do this after the above so that StartPositionTicks is set SetDeviceSpecificSubtitleInfo(streamInfo, mediaSource, auth.Token); - } + } } else { |
