Changed next page determination to ensure --after is followed even if there are no unique releases.

This commit is contained in:
DebaucheryLibrarian
2020-09-10 23:49:24 +02:00
parent a833476437
commit 0e8024adf1
8 changed files with 31 additions and 28 deletions

View File

@@ -31,8 +31,8 @@ function extractActors(scene) {
return release;
}
async function fetchLatestWrap(site, page = 1) {
const latest = await fetchLatest(site, page);
async function fetchLatestWrap(site, page = 1, include, preData) {
const latest = await fetchLatest(site, page, include, preData);
return latest.map(scene => extractActors(scene));
}

View File

@@ -44,8 +44,8 @@ function scrapeScene({ query }, channel) {
return release;
}
async function fetchLatestLocal(channel, page) {
return fetchLatest(channel, page, true);
async function fetchLatestLocal(channel, page, include, preData) {
return fetchLatest(channel, page, include, preData, true);
}
async function fetchScene(url, channel) {

View File

@@ -359,7 +359,7 @@ function scrapeProfile(html, url, actorName, entity) {
return profile;
}
async function fetchLatest(site, page = 1, entryIdFromTitle = false) {
async function fetchLatest(site, page = 1, include, preData, entryIdFromTitle = false) {
const url = site.parameters?.latest
? util.format(site.parameters.latest, page)
: `${site.url}/trial/categories/movies_${page}_d.html`;