Fixed Vivid requesting unavailable HTTPS resource, and breaking on non-existing parameters object.
This commit is contained in:
@@ -104,7 +104,7 @@ async function fetchSceneNative(url, site, release) {
|
||||
async function fetchSceneWrapper(url, site, release) {
|
||||
const scene = await fetchScene(url, site, release);
|
||||
|
||||
if (scene.date - new Date(site.parameters.lastNative) <= 0) {
|
||||
if (scene.date - new Date(site.parameters?.lastNative) <= 0) {
|
||||
// scene is probably still available on Vivid site, use search API to get URL and original date
|
||||
const searchUrl = `${site.url}/videos/api/?limit=10&sort=datedesc&search=${encodeURI(scene.title)}`;
|
||||
const searchRes = await bhttp.get(searchUrl, {
|
||||
|
||||
Reference in New Issue
Block a user