Fixed infinite pagination when scraping upcoming scenes.

This commit is contained in:
DebaucheryLibrarian 2020-09-13 01:41:52 +02:00
parent 52a22b6eca
commit b57b0a38f5
1 changed files with 6 additions and 2 deletions

View File

@ -44,8 +44,12 @@ async function filterUniqueReleases(latestReleases, accReleases) {
}
function needNextPage(releases, uniqueReleases, totalReleases, hasDates, upcoming) {
if (upcoming && uniqueReleases.length > 0) {
return argv.paginateUpcoming;
if (releases.length === 0) {
return false;
}
if (upcoming) {
return uniqueReleases.length > 0 && argv.paginateUpcoming;
}
if (argv.last) {