1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Use stream defaults in stream auto selection if previous source had no stream of that kind

This commit is contained in:
Shadowghost 2022-06-26 23:30:42 +02:00
parent 22a77ce54e
commit a792737add

View file

@ -2309,21 +2309,11 @@ class PlaybackManager {
return;
}
if (typeof prevSource.DefaultAudioStreamIndex != 'number'
|| typeof prevSource.DefaultSubtitleStreamIndex != 'number')
return;
if (typeof mediaSource.DefaultAudioStreamIndex != 'number'
|| typeof mediaSource.DefaultSubtitleStreamIndex != 'number') {
console.warn('AutoSet - No stream indexes (but prevSource has them)');
return;
}
if (audio) {
if (audio && typeof prevSource.DefaultAudioStreamIndex == 'number') {
rankStreamType(prevSource.DefaultAudioStreamIndex, prevSource, mediaSource, 'Audio');
}
if (subtitle) {
if (subtitle && typeof prevSource.DefaultSubtitleStreamIndex == 'number') {
rankStreamType(prevSource.DefaultSubtitleStreamIndex, prevSource, mediaSource, 'Subtitle');
}
} catch (e) {