mirror of https://github.com/jellyfin/jellyfin.git
test: collect candidate audio streams if no audio index is specified
To be consistent with the logic of StreamBuilder.
This commit is contained in:
parent
ca21a80c95
commit
47b583456a
|
@ -459,8 +459,16 @@ namespace Jellyfin.Model.Tests
|
||||||
// Audio stream not specified
|
// Audio stream not specified
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO: Fixme
|
bool isDefault = targetAudioStream?.IsDefault == true;
|
||||||
Assert.All(audioStreams, stream =>
|
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)
|
if (!stream.IsExternal)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue