mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove exceptions from user preference builder
This commit is contained in:
parent
7abe22780b
commit
375934ed13
1 changed files with 2 additions and 12 deletions
|
@ -49,10 +49,6 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
||||||
|
|
||||||
UserSettings.prototype.set = function (name, value, enableOnServer) {
|
UserSettings.prototype.set = function (name, value, enableOnServer) {
|
||||||
var userId = this.currentUserId;
|
var userId = this.currentUserId;
|
||||||
if (!userId) {
|
|
||||||
throw new Error('userId cannot be null');
|
|
||||||
}
|
|
||||||
|
|
||||||
var currentValue = this.get(name, enableOnServer);
|
var currentValue = this.get(name, enableOnServer);
|
||||||
var result = appSettings.set(name, value, userId);
|
var result = appSettings.set(name, value, userId);
|
||||||
|
|
||||||
|
@ -70,15 +66,9 @@ define(['appSettings', 'events'], function (appSettings, events) {
|
||||||
|
|
||||||
UserSettings.prototype.get = function (name, enableOnServer) {
|
UserSettings.prototype.get = function (name, enableOnServer) {
|
||||||
var userId = this.currentUserId;
|
var userId = this.currentUserId;
|
||||||
if (!userId) {
|
if (enableOnServer !== false && this.displayPrefs) {
|
||||||
throw new Error('userId cannot be null');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enableOnServer !== false) {
|
|
||||||
if (this.displayPrefs) {
|
|
||||||
return this.displayPrefs.CustomPrefs[name];
|
return this.displayPrefs.CustomPrefs[name];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return appSettings.get(name, userId);
|
return appSettings.get(name, userId);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue