Update MediaInfoService.cs
This commit is contained in:
parent
c3f749ec66
commit
a73ce1d781
|
@ -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…
Reference in New Issue
Block a user