'use strict'; // const bhttp = require('bhttp'); const { fetchScene, fetchLatest, fetchUpcoming, fetchProfile } = require('./gamma'); async function fetchSceneWrapper(url, site, baseRelease) { const release = await fetchScene(url, site, baseRelease); if (site.isNetwork && release.channel) { const channelUrl = url.replace('blowpass.com', `${release.channel}.com`); if (['onlyteenblowjobs', 'mommyblowsbest'].includes(release.channel)) { release.url = channelUrl.replace(/video\/\w+\//, 'scene/'); return release; } release.url = channelUrl.replace(/video\/\w+\//, 'video/'); } return release; } function getActorReleasesUrl(actorPath, page = 1) { return `https://www.blowpass.com/en/videos/blowpass/latest/All-Categories/0${actorPath}/${page}`; } async function networkFetchProfile({ name: actorName }, context, include) { return fetchProfile({ name: actorName }, context, null, getActorReleasesUrl, include); } module.exports = { fetchLatest, fetchProfile: networkFetchProfile, fetchUpcoming, fetchScene: fetchSceneWrapper, };