Use Redump + No-Intro DATs together for games; dedupe fuzzy matches
This commit is contained in:
@@ -52,8 +52,11 @@ python3 -m app.main
|
|||||||
## First-time setup
|
## First-time setup
|
||||||
|
|
||||||
1. Put your DAT files in `data/dats/`:
|
1. Put your DAT files in `data/dats/`:
|
||||||
- games: Redump `Sony - PlayStation Portable`
|
- games: Redump `Sony - PlayStation Portable` (authoritative hashes)
|
||||||
- videos: Redump `Sony - PlayStation Portable (UMD Video)`
|
**and** No-Intro `Sony - PlayStation Portable` (supplies the serials
|
||||||
|
Redump lacks — keeps serial-based matching working).
|
||||||
|
- videos: No-Intro `Sony - PlayStation Portable (UMD Video)` (Redump has
|
||||||
|
no UMD Video DAT).
|
||||||
2. Ingest them into the local SQLite library:
|
2. Ingest them into the local SQLite library:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -181,6 +181,16 @@ def match(conn, record):
|
|||||||
return "unknown", None
|
return "unknown", None
|
||||||
top = [cand for ratio, cand in scored if ratio >= best_ratio - 0.001]
|
top = [cand for ratio, cand in scored if ratio >= best_ratio - 0.001]
|
||||||
top = _narrow(conn, top, size)
|
top = _narrow(conn, top, size)
|
||||||
|
# The same disc can exist in multiple catalogs (e.g. No-Intro + Redump);
|
||||||
|
# collapse identical entries so they don't read as an ambiguous match.
|
||||||
|
seen = set()
|
||||||
|
deduped = []
|
||||||
|
for cand in top:
|
||||||
|
key = (cand.get("name"), size)
|
||||||
|
if key not in seen:
|
||||||
|
seen.add(key)
|
||||||
|
deduped.append(cand)
|
||||||
|
top = deduped
|
||||||
if len(top) == 1:
|
if len(top) == 1:
|
||||||
return f"fuzzy:{best_ratio:.2f}", top[0]
|
return f"fuzzy:{best_ratio:.2f}", top[0]
|
||||||
return "unknown", None
|
return "unknown", None
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
clrmamepro (
|
clrmamepro (
|
||||||
name "Sony - PlayStation Portable"
|
name "Sony - PlayStation Portable (No-Intro)"
|
||||||
description "Sony - PlayStation Portable"
|
description "Sony - PlayStation Portable"
|
||||||
version "2021.10.24"
|
version "2021.10.24"
|
||||||
homepage "http://github.com/robloach/libretro-dats"
|
homepage "http://github.com/robloach/libretro-dats"
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user