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:
@@ -487,6 +487,10 @@ async function storeFile(media, options) {
|
||||
throw new Error(`Media for '${media.role}' must be an image, but '${media.meta.mimetype}' was detected`);
|
||||
}
|
||||
|
||||
if (['teasers', 'trailers'].includes(media.role) && media.meta.type !== 'video') {
|
||||
throw new Error(`Media for '${media.role}' must be a video, but '${media.meta.mimetype}' was detected in ${media.src}`);
|
||||
}
|
||||
|
||||
const [stat] = await Promise.all([
|
||||
fsPromises.stat(media.file.path),
|
||||
fsPromises.mkdir(path.join(config.media.path, filedir), { recursive: true }),
|
||||
|
||||
Reference in New Issue
Block a user