Skip to content

Commit

Permalink
Make parsing in user settings setters consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
newo-2001 committed Aug 24, 2023
1 parent 31fadee commit f1d57b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scripts/settings/userSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export class UserSettings {
*/
backdropScreensaverInterval(val) {
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;
Expand All @@ -449,7 +449,7 @@ export class UserSettings {
*/
libraryPageSize(val) {
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);
Expand All @@ -468,7 +468,7 @@ export class UserSettings {
*/
maxDaysForNextUp(val) {
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);
Expand All @@ -487,7 +487,7 @@ export class UserSettings {
*/
enableRewatchingInNextUp(val) {
if (val !== undefined) {
return this.set('enableRewatchingInNextUp', val, false);
return this.set('enableRewatchingInNextUp', val.toString(), false);
}

return toBoolean(this.get('enableRewatchingInNextUp', false), false);
Expand Down

0 comments on commit f1d57b7

Please sign in to comment.