mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Make parsing in user settings setters consistent
This commit is contained in:
parent
31fadeeae4
commit
f1d57b7d89
1 changed files with 4 additions and 4 deletions
|
@ -436,7 +436,7 @@ export class UserSettings {
|
||||||
*/
|
*/
|
||||||
backdropScreensaverInterval(val) {
|
backdropScreensaverInterval(val) {
|
||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
return this.set('backdropScreensaverInterval', parseInt(val, 10), false);
|
return this.set('backdropScreensaverInterval', val.toString(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return parseInt(this.get('backdropScreensaverInterval', false), 10) || 5;
|
return parseInt(this.get('backdropScreensaverInterval', false), 10) || 5;
|
||||||
|
@ -449,7 +449,7 @@ export class UserSettings {
|
||||||
*/
|
*/
|
||||||
libraryPageSize(val) {
|
libraryPageSize(val) {
|
||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
return this.set('libraryPageSize', parseInt(val, 10), false);
|
return this.set('libraryPageSize', val.toString(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const libraryPageSize = parseInt(this.get('libraryPageSize', false), 10);
|
const libraryPageSize = parseInt(this.get('libraryPageSize', false), 10);
|
||||||
|
@ -468,7 +468,7 @@ export class UserSettings {
|
||||||
*/
|
*/
|
||||||
maxDaysForNextUp(val) {
|
maxDaysForNextUp(val) {
|
||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
return this.set('maxDaysForNextUp', parseInt(val, 10), false);
|
return this.set('maxDaysForNextUp', val.toString(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxDaysForNextUp = parseInt(this.get('maxDaysForNextUp', false), 10);
|
const maxDaysForNextUp = parseInt(this.get('maxDaysForNextUp', false), 10);
|
||||||
|
@ -487,7 +487,7 @@ export class UserSettings {
|
||||||
*/
|
*/
|
||||||
enableRewatchingInNextUp(val) {
|
enableRewatchingInNextUp(val) {
|
||||||
if (val !== undefined) {
|
if (val !== undefined) {
|
||||||
return this.set('enableRewatchingInNextUp', val, false);
|
return this.set('enableRewatchingInNextUp', val.toString(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return toBoolean(this.get('enableRewatchingInNextUp', false), false);
|
return toBoolean(this.get('enableRewatchingInNextUp', false), false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue