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

Add DTS enabling option

This commit is contained in:
Dmitry Lyzo 2024-04-15 20:26:12 +03:00 committed by Dmitry Lyzo
parent 58051dcd80
commit ce15adba69
5 changed files with 27 additions and 1 deletions

View file

@ -132,6 +132,19 @@ class AppSettings {
return toBoolean(this.get('limitSupportedVideoResolution'), false);
}
/**
* Get or set 'Enable DTS' state.
* @param {boolean|undefined} val - Flag to enable 'Enable DTS' or undefined.
* @return {boolean} 'Enable DTS' state.
*/
enableDts(val) {
if (val !== undefined) {
return this.set('enableDts', val.toString());
}
return toBoolean(this.get('enableDts'), false);
}
set(name, value, userId) {
const currentValue = this.get(name, userId);
localStorage.setItem(this.#getKey(name, userId), value);