Added mimetype check to teasers and trailers. Added chapters to MindGeek scraper, fixed scene ID extraction getting stuck on numbers in domain name. Ordering chapters by timestamp.
This commit is contained in:
@@ -250,17 +250,21 @@ async function updateReleasesSearch(releaseIds) {
|
||||
}
|
||||
|
||||
async function storeChapters(releases) {
|
||||
const chapters = releases.map(release => release.chapters?.map((chapter, index) => ({
|
||||
releaseId: release.id,
|
||||
index: index + 1,
|
||||
time: chapter.time,
|
||||
duration: chapter.duration,
|
||||
title: chapter.title,
|
||||
description: chapter.description,
|
||||
poster: chapter.poster,
|
||||
photos: chapter.photos,
|
||||
tags: chapter.tags,
|
||||
}))).flat().filter(Boolean);
|
||||
const chapters = releases
|
||||
.map(release => release.chapters?.map((chapter, index) => ({
|
||||
releaseId: release.id,
|
||||
index: index + 1,
|
||||
time: chapter.time,
|
||||
duration: chapter.duration,
|
||||
title: chapter.title,
|
||||
description: chapter.description,
|
||||
poster: chapter.poster,
|
||||
photos: chapter.photos,
|
||||
tags: chapter.tags,
|
||||
})))
|
||||
.flat()
|
||||
.filter(Boolean)
|
||||
.sort((chapterA, chapterB) => chapterA.time - chapterB.time);
|
||||
|
||||
const curatedChapterEntries = chapters.map(chapter => ({
|
||||
index: chapter.index,
|
||||
|
||||
Reference in New Issue
Block a user