mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-16 18:38:25 -07:00
Merge pull request #1627 from rom4nik/master
Fix required track count for subtitle selector to appear
This commit is contained in:
commit
120ce4f0ff
@ -251,7 +251,7 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti
|
|||||||
return 'Video' === m.Type;
|
return 'Video' === m.Type;
|
||||||
});
|
});
|
||||||
|
|
||||||
// This only makes sence on Video items
|
// This only makes sense on Video items
|
||||||
if (videoTracks.length) {
|
if (videoTracks.length) {
|
||||||
var selected = -1 === selectedId ? ' selected' : '';
|
var selected = -1 === selectedId ? ' selected' : '';
|
||||||
select.innerHTML = '<option value="-1">' + globalize.translate('Off') + '</option>' + tracks.map(function (v) {
|
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>';
|
return '<option value="' + v.Index + '" ' + selected + '>' + v.DisplayTitle + '</option>';
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
if (tracks.length > 1) {
|
if (tracks.length > 0) {
|
||||||
select.removeAttribute('disabled');
|
select.removeAttribute('disabled');
|
||||||
} else {
|
} else {
|
||||||
select.setAttribute('disabled', 'disabled');
|
select.setAttribute('disabled', 'disabled');
|
||||||
|
Loading…
Reference in New Issue
Block a user