Fixed infinite pagination when scraping upcoming scenes.
This commit is contained in:
parent
52a22b6eca
commit
b57b0a38f5
|
@ -44,8 +44,12 @@ async function filterUniqueReleases(latestReleases, accReleases) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function needNextPage(releases, uniqueReleases, totalReleases, hasDates, upcoming) {
|
function needNextPage(releases, uniqueReleases, totalReleases, hasDates, upcoming) {
|
||||||
if (upcoming && uniqueReleases.length > 0) {
|
if (releases.length === 0) {
|
||||||
return argv.paginateUpcoming;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (upcoming) {
|
||||||
|
return uniqueReleases.length > 0 && argv.paginateUpcoming;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argv.last) {
|
if (argv.last) {
|
||||||
|
|
Loading…
Reference in New Issue