Use Math.max in query limit for movies list

This commit is contained in:
MrTimscampi 2020-04-04 15:45:57 +02:00
parent 2c6029fc93
commit 9fad1217d5

View file

@ -43,7 +43,9 @@ define(["loading", "layoutManager", "userSettings", "events", "libraryBrowser",
return;
}
query.StartIndex -= query.Limit;
if (userSettings.libraryPageSize() > 0) {
query.StartIndex = Math.max(0, query.StartIndex - query.Limit);
}
itemsContainer.refreshItems();
}