test: collect candidate audio streams if no audio index is specified

To be consistent with the logic of StreamBuilder.
pull/11046/head
Dmitry Lyzo 3 months ago
parent ca21a80c95
commit 47b583456a

@ -459,8 +459,16 @@ namespace Jellyfin.Model.Tests
// Audio stream not specified
else
{
// TODO: Fixme
Assert.All(audioStreams, stream =>
bool isDefault = targetAudioStream?.IsDefault == true;
var language = targetAudioStream?.Language;
// Collect candidate audio streams
var candidateAudioStreams = audioStreams.Where(stream =>
{
return isDefault ? stream.IsDefault : (stream.Language == language);
});
Assert.All(candidateAudioStreams, stream =>
{
if (!stream.IsExternal)
{

Loading…
Cancel
Save