Add saving aspect ratio in video player

This commit is contained in:
Bill Thornton
2025-04-02 11:09:12 -04:00
parent b95a9455c2
commit 34282e821a
4 changed files with 39 additions and 28 deletions
+13
View File
@@ -247,6 +247,19 @@ class AppSettings {
return toBoolean(this.get('alwaysRemuxMp3'), false);
}
/**
* Get or set the preferred video aspect ratio.
* @param {string|undefined} val - The aspect ratio or undefined.
* @returns {string} The saved aspect ratio state.
*/
aspectRatio(val) {
if (val !== undefined) {
return this.set('aspectRatio', val);
}
return this.get('aspectRatio') || '';
}
set(name, value, userId) {
const currentValue = this.get(name, userId);
localStorage.setItem(this.#getKey(name, userId), value);