diff --git a/src/scrapers/aylo.js b/src/scrapers/aylo.js index 850ddf08..ba4e398b 100755 --- a/src/scrapers/aylo.js +++ b/src/scrapers/aylo.js @@ -81,7 +81,7 @@ function scrapeLatestX(data, site, filterChannel, options) { const basepath = getBasePath(site); - release.url = `${basepath}/${release.entryId}/${slugify(release.title)}`; + release.url = `${basepath}/${data.id}/${slugify(release.title)}`; // spartanId doesn't work in URLs release.date = new Date(data.dateReleased); release.duration = data.videos.mediabook?.length > 1 ? data.videos.mediabook.length : null; @@ -128,7 +128,7 @@ async function scrapeLatest(items, site, filterChannel, options) { function scrapeRelease(data, url, channel, networkName, options) { const release = {}; - const { id: entryId, title, description } = data; + const { title, description } = data; release.entryId = (options?.parameters.preferSpartanId && data.spartanId) || data.id; release.title = title; @@ -156,7 +156,7 @@ function scrapeRelease(data, url, channel, networkName, options) { const siteName = data.collections[0]?.name || data.brand; release.channel = slugify(siteName, ''); - release.url = url || `https://www.${networkName || data.brand}.com/scene/${entryId}/`; + release.url = url || `https://www.${networkName || data.brand}.com/scene/${data.id}/`; // spartanId is invalid in URLs if (data.parent?.type === 'movie' || data.parent?.type === 'serie') { release[data.parent.type] = {