mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use enum values for resolution options and translate names
This commit is contained in:
parent
5c998e6129
commit
5448ea1244
3 changed files with 37 additions and 31 deletions
|
@ -1,4 +1,6 @@
|
|||
import { ImageResolution } from '@jellyfin/sdk/lib/generated-client/models/image-resolution';
|
||||
import 'jquery';
|
||||
|
||||
import loading from '../../components/loading/loading';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import '../../elements/emby-checkbox/emby-checkbox';
|
||||
|
@ -24,15 +26,18 @@ import alert from '../../components/alert';
|
|||
})).val(config.UICulture);
|
||||
page.querySelector('#txtChapterImageResolution').value = config.ChapterImageResolution;
|
||||
$('#txtChapterImageResolution', page).html([
|
||||
{name: 'Match Source', value: 'MatchSource'},
|
||||
{name: '2160p', value: 'P2160'},
|
||||
{name: '1440p', value: 'P1440'},
|
||||
{name: '1080p', value: 'P1080'},
|
||||
{name: '720p', value: 'P720'},
|
||||
{name: '480p', value: 'P480'},
|
||||
{name: '360p', value: 'P360'},
|
||||
{name: '240p', value: 'P240'},
|
||||
{name: '144p', value: 'P144'}
|
||||
{
|
||||
name: globalize.translate('ResolutionMatchSource'),
|
||||
value: ImageResolution.MatchSource
|
||||
},
|
||||
{ name: '2160p', value: ImageResolution.P2160 },
|
||||
{ name: '1440p', value: ImageResolution.P1440 },
|
||||
{ name: '1080p', value: ImageResolution.P1080 },
|
||||
{ name: '720p', value: ImageResolution.P720 },
|
||||
{ name: '480p', value: ImageResolution.P480 },
|
||||
{ name: '360p', value: ImageResolution.P360 },
|
||||
{ name: '240p', value: ImageResolution.P240 },
|
||||
{ name: '144p', value: ImageResolution.P144 }
|
||||
].map(function (resolution) {
|
||||
return '<option value="' + resolution.value + '">' + resolution.name + '</option>';
|
||||
})).val(config.ChapterImageResolution);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue