mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Extract condition from Where clause to eliminate extra filtering (#12614)
This commit is contained in:
parent
ae1dd5b1fc
commit
54f663b0f3
@ -805,9 +805,13 @@ namespace MediaBrowser.Model.Dlna
|
|||||||
}
|
}
|
||||||
|
|
||||||
var transcodingProfiles = options.Profile.TranscodingProfiles
|
var transcodingProfiles = options.Profile.TranscodingProfiles
|
||||||
.Where(i => !item.UseMostCompatibleTranscodingProfile || string.Equals(i.Container, "ts", StringComparison.OrdinalIgnoreCase))
|
|
||||||
.Where(i => i.Type == playlistItem.MediaType && i.Context == options.Context);
|
.Where(i => i.Type == playlistItem.MediaType && i.Context == options.Context);
|
||||||
|
|
||||||
|
if (item.UseMostCompatibleTranscodingProfile)
|
||||||
|
{
|
||||||
|
transcodingProfiles = transcodingProfiles.Where(i => string.Equals(i.Container, "ts", StringComparison.OrdinalIgnoreCase));
|
||||||
|
}
|
||||||
|
|
||||||
if (options.AllowVideoStreamCopy)
|
if (options.AllowVideoStreamCopy)
|
||||||
{
|
{
|
||||||
// prefer direct copy profile
|
// prefer direct copy profile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user