mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
filter audio streams that don't have any channels
This commit is contained in:
parent
517006a620
commit
14e28f9eb2
@ -114,7 +114,7 @@ namespace MediaBrowser.Api.Playback
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
protected readonly CultureInfo UsCulture = new CultureInfo("en-US");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The fast seek offset seconds
|
/// The fast seek offset seconds
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -227,6 +227,12 @@ namespace MediaBrowser.Api.Playback
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (returnFirstIfNoIndex && type == MediaStreamType.Audio)
|
||||||
|
{
|
||||||
|
return streams.FirstOrDefault(i => i.Channels.HasValue && i.Channels.Value > 0) ??
|
||||||
|
streams.FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
// Just return the first one
|
// Just return the first one
|
||||||
return returnFirstIfNoIndex ? streams.FirstOrDefault() : null;
|
return returnFirstIfNoIndex ? streams.FirstOrDefault() : null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user