Fixed Vilde entry ID extract failing on PNG posters.

This commit is contained in:
DebaucheryLibrarian
2026-06-02 06:31:51 +02:00
parent dd8d4e51f9
commit 565e7568e0

View File

@@ -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;
}