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

Add maximum allowed video resolution selector

This commit is contained in:
Dmitry Lyzo 2022-06-17 00:17:10 +03:00
parent 0bd774dd45
commit f06cd961d5
6 changed files with 80 additions and 6 deletions

View file

@ -92,6 +92,19 @@ class AppSettings {
return val ? parseInt(val) : null;
}
/**
* Get or set 'Maximum video width'
* @param {number|undefined} val - Maximum video width or undefined.
* @return {number} Maximum video width.
*/
maxVideoWidth(val) {
if (val !== undefined) {
return this.set('maxVideoWidth', val.toString());
}
return parseInt(this.get('maxVideoWidth') || '0', 10) || 0;
}
set(name, value, userId) {
const currentValue = this.get(name, userId);
AppStorage.setItem(this.#getKey(name, userId), value);