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

Add library page size settings on movies

This commit is contained in:
MrTimscampi 2020-03-21 00:26:55 +01:00
parent 10a4901226
commit b34a376691
5 changed files with 32 additions and 2 deletions

View file

@ -202,6 +202,19 @@ define(['appSettings', 'events'], function (appSettings, events) {
return this.get('screensaver', false);
};
UserSettings.prototype.libraryPageSize = function (val) {
if (val != null) {
return this.set('libraryPageSize', parseInt(val, 10), false);
}
if (parseInt(this.get('libraryPageSize', false), 10) === 0) {
// Explicitely return 0 to avoid returning 100 because 0 is falsy.
return 0;
} else {
return parseInt(this.get('libraryPageSize', false), 10) || 100;
}
};
UserSettings.prototype.soundEffects = function (val) {
if (val != null) {
return this.set('soundeffects', val, false);