Update MediaInfoService.cs

pull/2160/head
artiume 5 years ago committed by GitHub
parent c3f749ec66
commit a73ce1d781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -415,11 +415,7 @@ namespace MediaBrowser.Api.Playback
// Beginning of Playback Determination: Attempt DirectPlay first
if (mediaSource.SupportsDirectPlay)
{
if (mediaSource.IsRemote && forceDirectPlayRemoteMediaSource && user.Policy.ForceRemoteSourceTranscoding)
{
mediaSource.SupportsDirectPlay = false;
}
else if (mediaSource.IsRemote && user.Policy.ForceRemoteSourceTranscoding)
if (mediaSource.IsRemote && user.Policy.ForceRemoteSourceTranscoding)
{
mediaSource.SupportsDirectPlay = false;
}
@ -468,11 +464,7 @@ namespace MediaBrowser.Api.Playback
if (mediaSource.SupportsDirectStream)
{
if (mediaSource.IsRemote && forceDirectPlayRemoteMediaSource && user.Policy.ForceRemoteSourceTranscoding)
{
mediaSource.SupportsDirectStream = false;
}
else if (mediaSource.IsRemote && user.Policy.ForceRemoteSourceTranscoding)
if (mediaSource.IsRemote && user.Policy.ForceRemoteSourceTranscoding)
{
mediaSource.SupportsDirectStream = false;
}
@ -516,17 +508,6 @@ namespace MediaBrowser.Api.Playback
{
if (mediaSource.IsRemote && user.Policy.ForceRemoteSourceTranscoding)
{
if (GetMaxBitrate(maxBitrate, user) < mediaSource.Bitrate)
{
options.MaxBitrate = GetMaxBitrate(maxBitrate, user);
}
else
{
options.MaxBitrate = mediaSource.Bitrate;
}
}
else
{
options.MaxBitrate = GetMaxBitrate(maxBitrate, user);
}
@ -543,7 +524,10 @@ namespace MediaBrowser.Api.Playback
streamInfo.StartPositionTicks = startTimeTicks;
mediaSource.TranscodingUrl = streamInfo.ToUrl("-", auth.Token).TrimStart('-');
mediaSource.TranscodingUrl += "&allowVideoStreamCopy=false";
mediaSource.TranscodingUrl += "&allowAudioStreamCopy=false";
if (!allowAudioStreamCopy)
{
mediaSource.TranscodingUrl += "&allowAudioStreamCopy=false";
}
mediaSource.TranscodingContainer = streamInfo.Container;
mediaSource.TranscodingSubProtocol = streamInfo.SubProtocol;

Loading…
Cancel
Save