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

Make backdrop screensaver interval configurable

This commit is contained in:
newo-2001 2023-08-12 15:43:47 +02:00
parent bb12bb94b7
commit 71abbf05f4
6 changed files with 32 additions and 2 deletions

View file

@ -429,6 +429,19 @@ export class UserSettings {
return this.get('screensaver', false);
}
/**
* Get or set the interval between backdrops when using the backdrop screensaver.
* @param {number|undefined} val - The interval between backdrops in milliseconds.
* @return {number} The interval between backdrops in milliseconds.
*/
backdropScreensaverInterval(val) {
if (val !== undefined) {
return this.set('backdropScreensaverInterval', parseInt(val, 10), false);
}
return parseInt(this.get('backdropScreensaverInterval', false), 10) || 5;
}
/**
* Get or set library page size.
* @param {number|undefined} val - Library page size.
@ -624,6 +637,7 @@ export const dashboardTheme = currentSettings.dashboardTheme.bind(currentSetting
export const skin = currentSettings.skin.bind(currentSettings);
export const theme = currentSettings.theme.bind(currentSettings);
export const screensaver = currentSettings.screensaver.bind(currentSettings);
export const backdropScreensaverInterval = currentSettings.backdropScreensaverInterval.bind(currentSettings);
export const libraryPageSize = currentSettings.libraryPageSize.bind(currentSettings);
export const maxDaysForNextUp = currentSettings.maxDaysForNextUp.bind(currentSettings);
export const enableRewatchingInNextUp = currentSettings.enableRewatchingInNextUp.bind(currentSettings);