fix: settle the round 3 site packages together

This commit is contained in:
Abdessamad Derraz committed 2026-10-23 11:12:12 +02:00
1 parent d168ceb8a8
commit f0e7d87def
10 files changed
+44 -11

No files matched your search

+3 -1
View File
@@ -317,7 +317,9 @@ const CATEGORY_WORDS: Record<string, string> = { bios: 'BIOS', game_data: 'game
// own page (systems/sony-playstation/) is part of its manufacturer's file
// (systems/sony.json), found by dropping words from the end of the slug.
const heldFile = async (item: Item): Promise<Held | undefined> => {
const slug = /^systems\/([^/]+)\//.exec(item.url)?.[1];
// Lookup urls are site-absolute (/retrobios/systems/...) since the API
// names every address from the site root.
const slug = /(?:^|\/)systems\/([^/]+)\//.exec(item.url)?.[1];
if (!slug || !item.sha1) return undefined;
const words = slug.split('-');
for (let size = words.length; size > 0; size -= 1) {