rework episode queries

This commit is contained in:
Luke Pulverenti
2017-08-12 22:09:07 -04:00
parent cf350f3b7e
commit 6b28eee2db
22 changed files with 30 additions and 503 deletions

View File

@@ -925,19 +925,6 @@ namespace MediaBrowser.Controller.MediaEncoding
return false;
}
// Video bitrate must fall within requested value
if (request.AudioBitRate.HasValue)
{
if (!audioStream.BitRate.HasValue || audioStream.BitRate.Value <= 0)
{
return false;
}
if (audioStream.BitRate.Value > request.AudioBitRate.Value)
{
return false;
}
}
// Channels must fall within requested value
var channels = request.AudioChannels ?? request.MaxAudioChannels;
if (channels.HasValue)
@@ -965,6 +952,19 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
// Video bitrate must fall within requested value
if (request.AudioBitRate.HasValue)
{
if (!audioStream.BitRate.HasValue || audioStream.BitRate.Value <= 0)
{
return false;
}
if (audioStream.BitRate.Value > request.AudioBitRate.Value)
{
return false;
}
}
return request.EnableAutoStreamCopy;
}