mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add option to control how long the screensaver takes to start (#6165)
* Added option to control how long the screensaver takes to start * ESLint fixes * Requested pull request fixes * Alphabetized the translation string placement * Simplified getter
This commit is contained in:
parent
40d9f43049
commit
0cc2b0698a
5 changed files with 28 additions and 2 deletions
|
@ -431,6 +431,19 @@ export class UserSettings {
|
|||
return parseInt(this.get('backdropScreensaverInterval', false), 10) || 5;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set the amount of time it takes to activate the screensaver in seconds. Default 3 minutes.
|
||||
* @param {number|undefined} [val] - The amount of time it takes to activate the screensaver in seconds.
|
||||
* @return {number} The amount of time it takes to activate the screensaver in seconds.
|
||||
*/
|
||||
screensaverTime(val) {
|
||||
if (val !== undefined) {
|
||||
return this.set('screensaverTime', val.toString(), false);
|
||||
}
|
||||
|
||||
return parseInt(this.get('screensaverTime', false), 10) || 180;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set library page size.
|
||||
* @param {number|undefined} [val] - Library page size.
|
||||
|
@ -650,6 +663,7 @@ 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 screensaverTime = currentSettings.screensaverTime.bind(currentSettings);
|
||||
export const libraryPageSize = currentSettings.libraryPageSize.bind(currentSettings);
|
||||
export const maxDaysForNextUp = currentSettings.maxDaysForNextUp.bind(currentSettings);
|
||||
export const enableRewatchingInNextUp = currentSettings.enableRewatchingInNextUp.bind(currentSettings);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue