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

Merge pull request #1627 from rom4nik/master

Fix required track count for subtitle selector to appear

(cherry picked from commit 120ce4f0ff)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
dkanada 2020-07-23 11:40:42 +09:00 committed by Joshua M. Boniface
parent 76f9b2c741
commit 7f133ff8cd

View file

@ -251,7 +251,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
return 'Video' === m.Type;
});
// This only makes sence on Video items
// This only makes sense on Video items
if (videoTracks.length) {
var selected = -1 === selectedId ? ' selected' : '';
select.innerHTML = '<option value="-1">' + globalize.translate('Off') + '</option>' + tracks.map(function (v) {
@ -259,7 +259,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
return '<option value="' + v.Index + '" ' + selected + '>' + v.DisplayTitle + '</option>';
}).join('');
if (tracks.length > 1) {
if (tracks.length > 0) {
select.removeAttribute('disabled');
} else {
select.setAttribute('disabled', 'disabled');