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

Merge pull request #5315 from dmitrylyzo/limit-supported-resolution

Add option to limit maximum supported video resolution
This commit is contained in:
Bill Thornton 2024-03-25 03:49:03 -04:00 committed by GitHub
commit 1cfc4696f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 45 additions and 11 deletions

View file

@ -119,6 +119,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);