Added actor release URL resolver for Peter North on Fame Digital.

This commit is contained in:
ThePendulum 2020-02-07 01:59:43 +01:00
parent 971cda1cb5
commit be5dd4acd8
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
'use strict'; 'use strict';
const argv = require('../argv');
const { fetchLatest, fetchApiLatest, fetchUpcoming, fetchApiUpcoming, fetchScene, fetchProfile, fetchApiProfile } = require('./gamma'); const { fetchLatest, fetchApiLatest, fetchUpcoming, fetchApiUpcoming, fetchScene, fetchProfile, fetchApiProfile } = require('./gamma');
function extractLowArtActors(release) { function extractLowArtActors(release) {
@ -42,12 +43,16 @@ async function networkFetchUpcoming(site, page = 1) {
return fetchUpcoming(site, page); return fetchUpcoming(site, page);
} }
function getActorReleasesUrl(actorPath, page = 1) {
return `https://www.peternorth.com/en/videos/All-Categories/0${actorPath}/All-Dvds/0/latest/${page}`;
}
async function networkFetchProfile(actorName) { async function networkFetchProfile(actorName) {
// not all Fame Digital sites offer Gamma actors // not all Fame Digital sites offer Gamma actors
const [devils, rocco, peter] = await Promise.all([ const [devils, rocco, peter] = await Promise.all([
fetchApiProfile(actorName, 'devilsfilm', true), fetchApiProfile(actorName, 'devilsfilm', true),
fetchApiProfile(actorName, 'roccosiffredi'), fetchApiProfile(actorName, 'roccosiffredi'),
fetchProfile(actorName, 'peternorth', true), argv.withReleases ? fetchProfile(actorName, 'peternorth', true, getActorReleasesUrl) : [],
]); ]);
if (devils || rocco || peter) { if (devils || rocco || peter) {