diff options
| author | Dmitry Lyzo <ashephard0@gmail.com> | 2024-02-20 21:32:54 +0300 |
|---|---|---|
| committer | Dmitry Lyzo <ashephard0@gmail.com> | 2024-02-22 09:37:59 +0300 |
| commit | 47b583456aa8b906e74fbf9e1c99946ed7106b48 (patch) | |
| tree | 8a7ed2bf1834e9ee7a23dd60bbc716ac1d270da7 | |
| parent | ca21a80c95d7e96734484ee642f761be2f3a4d0c (diff) | |
test: collect candidate audio streams if no audio index is specified
To be consistent with the logic of StreamBuilder.
| -rw-r--r-- | tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs b/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs index d9dceee55..f2e88c76f 100644 --- a/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs +++ b/tests/Jellyfin.Model.Tests/Dlna/StreamBuilderTests.cs @@ -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) { |
