Fixed Vilde entry ID extract failing on PNG posters.
This commit is contained in:
@@ -6,7 +6,7 @@ const slugify = require('../utils/slugify');
|
||||
|
||||
function extractEntryId(poster) {
|
||||
try {
|
||||
return slugify(new URL(poster).pathname.match(/\/images\/(.*?)\.jpg/)?.[1]?.replace(/smak.*/i, ''), '');
|
||||
return slugify(new URL(poster).pathname.match(/\/images\/(.*?)\.[a-z]{3,4}/i)?.[1]?.replace(/smak.*/i, ''), '');
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user