Reordered scraper arguments. Fixed Jules Jordan scraper for Amateur Allure.
This commit is contained in:
@@ -80,10 +80,8 @@ function needNextPage(uniqueReleases, pageAccReleases) {
|
||||
async function scrapeReleases(scraper, entity, preData, upcoming = false) {
|
||||
const scrapePage = async (page = 1, accReleases = []) => {
|
||||
const latestReleases = upcoming
|
||||
? await scraper.fetchUpcoming(entity, page, preData, include)
|
||||
: await scraper.fetchLatest(entity, page, preData, include);
|
||||
|
||||
await scraper.fetchMovies(entity, page);
|
||||
? await scraper.fetchUpcoming(entity, page, include, preData)
|
||||
: await scraper.fetchLatest(entity, page, include, preData);
|
||||
|
||||
if (!Array.isArray(latestReleases)) {
|
||||
// scraper is unable to fetch the releases and returned a HTTP code or null
|
||||
@@ -173,6 +171,10 @@ async function scrapeChannelReleases(scraper, channelEntity, preData) {
|
||||
: [],
|
||||
]);
|
||||
|
||||
if (scraper.fetchMovies) {
|
||||
await scraper.fetchMovies(channelEntity);
|
||||
}
|
||||
|
||||
logger.info(`Fetching ${latestReleases.length} latest and ${upcomingReleases.length} upcoming updates for '${channelEntity.name}' (${channelEntity.parent?.name})`);
|
||||
|
||||
return [...latestReleases, ...upcomingReleases];
|
||||
|
||||
Reference in New Issue
Block a user