mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
filter audio streams that don't have any channels
This commit is contained in:
parent
954a5cd20f
commit
0b4f16bbd5
1 changed files with 3 additions and 2 deletions
|
@ -651,8 +651,9 @@
|
|||
|
||||
function getInitialAudioStreamIndex(mediaStreams, user) {
|
||||
|
||||
// Find all audio streams with at least one channel
|
||||
var audioStreams = mediaStreams.filter(function (stream) {
|
||||
return stream.Type == "Audio";
|
||||
return stream.Type == "Audio" && stream.Channels;
|
||||
});
|
||||
|
||||
if (user.Configuration.AudioLanguagePreference) {
|
||||
|
@ -660,7 +661,7 @@
|
|||
for (var i = 0, length = audioStreams.length; i < length; i++) {
|
||||
var mediaStream = audioStreams[i];
|
||||
|
||||
if (mediaStream.Type == "Audio" && mediaStream.Language == user.Configuration.AudioLanguagePreference) {
|
||||
if (mediaStream.Language == user.Configuration.AudioLanguagePreference) {
|
||||
return mediaStream.Index;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue