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
|
||||
|
||||
1. Put your DAT files in `data/dats/`:
|
||||
- games: Redump `Sony - PlayStation Portable`
|
||||
- videos: Redump `Sony - PlayStation Portable (UMD Video)`
|
||||
- games: Redump `Sony - PlayStation Portable` (authoritative hashes)
|
||||
**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:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -181,6 +181,16 @@ def match(conn, record):
|
||||
return "unknown", None
|
||||
top = [cand for ratio, cand in scored if ratio >= best_ratio - 0.001]
|
||||
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:
|
||||
return f"fuzzy:{best_ratio:.2f}", top[0]
|
||||
return "unknown", None
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
clrmamepro (
|
||||
name "Sony - PlayStation Portable"
|
||||
name "Sony - PlayStation Portable (No-Intro)"
|
||||
description "Sony - PlayStation Portable"
|
||||
version "2021.10.24"
|
||||
homepage "http://github.com/robloach/libretro-dats"
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user