mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 11:58:20 -07:00
Changed var to const
See https://github.com/jellyfin/jellyfin-web/pull/1237#issuecomment-713003436
This commit is contained in:
parent
746a6231fa
commit
31af91f8c7
@ -167,18 +167,18 @@ function renderTrackSelections(page, instance, item, forceReload) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var mediaSources = item.MediaSources;
|
const mediaSources = item.MediaSources;
|
||||||
|
|
||||||
var resolutionNames = [];
|
const resolutionNames = [];
|
||||||
var sourceNames = [];
|
const sourceNames = [];
|
||||||
mediaSources.forEach(function (v) {
|
mediaSources.forEach(function (v) {
|
||||||
((v.Name.endsWith('p') || v.Name.endsWith('i'))) && !Number.isNaN(parseInt(v.Name, 10) ? resolutionNames.push(v) : sourceNames.push(v);
|
((v.Name.endsWith('p') || v.Name.endsWith('i'))) && !Number.isNaN(parseInt(v.Name, 10) ? resolutionNames.push(v) : sourceNames.push(v);
|
||||||
});
|
});
|
||||||
|
|
||||||
resolutionNames.sort((a, b) => parseInt(b.Name, 10) - parseInt(a.Name, 10));
|
resolutionNames.sort((a, b) => parseInt(b.Name, 10) - parseInt(a.Name, 10));
|
||||||
sourceNames.sort(function(a, b) {
|
sourceNames.sort(function(a, b) {
|
||||||
var nameA = a.Name.toUpperCase();
|
const nameA = a.Name.toUpperCase();
|
||||||
var nameB = b.Name.toUpperCase();
|
const nameB = b.Name.toUpperCase();
|
||||||
if (nameA < nameB) {
|
if (nameA < nameB) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (nameA > nameB) {
|
} else if (nameA > nameB) {
|
||||||
|
Loading…
Reference in New Issue
Block a user