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

Add option to limit maximum supported video resolution

This commit is contained in:
Dmitry Lyzo 2024-03-24 23:23:28 +03:00
parent 2097c526d2
commit 6e6b696bd9
5 changed files with 40 additions and 6 deletions

View file

@ -105,6 +105,19 @@ class AppSettings {
return parseInt(this.get('maxVideoWidth') || '0', 10) || 0;
}
/**
* Get or set 'Limit maximum supported video resolution' state.
* @param {boolean|undefined} val - Flag to enable 'Limit maximum supported video resolution' or undefined.
* @return {boolean} 'Limit maximum supported video resolution' state.
*/
limitSupportedVideoResolution(val) {
if (val !== undefined) {
return this.set('limitSupportedVideoResolution', val.toString());
}
return toBoolean(this.get('limitSupportedVideoResolution'), false);
}
set(name, value, userId) {
const currentValue = this.get(name, userId);
localStorage.setItem(this.#getKey(name, userId), value);