Investigated per-song provider responses on lrc.red and hardened generic matching (no per-song hardcoding).
Provider findings (queried live: match.json with/without duration, search.json, /s/{isrc}.ttml):
- #75 AIZO / King Gnu: provider returns the official recording first (JPU902504639) with a correct, internally consistent TTML. No client change applies; likely transient or player-duration mismatch.
- #79 KUSUSHIKI / Mrs. GREEN APPLE: official (JPPO02501002) is in match.json, but the full dual title finds nothing via text search (verified empty); the Latin half alone finds official + a cover. New half fallback covers the case where match.json ever omits the official.
- #80 On The Way / AiNA THE END: official (JPB602501972) first in match.json with correct TTML; same hardening as #79.
- #82 JANE DOE duet: joined-artist match.json and text search return ONLY a vally.exe cover whose TTML is a near-empty placeholder (the reported Miss). The official (JPU902502822, credited '米津玄師, Utada') is found only via primary-artist text search. New primary-artist fallback merges it in and ranking puts it first. Fixes #82.
- #84 Dance with STEEL BALL RUN / Yugo Kanno: provider has no such recording (match.json: unrelated tracks; search.json: empty; only unrelated fan songs for 'STEEL BALL RUN'). Nothing correct to display; commented on the issue.
Changes (src-tauri/src/lyrics.rs):
- title_halves: split dual-script 'A - B' titles (spaced -, en/em dash) for fallback queries.
- merge_half_hits: query both halves concurrently via text search when no exact hit; best-effort merge.
- primary-artist text-search fallback in lrc_red_matches when no exact hit (fixes duets); benefits sync_words too.
- extracted merge_text_hits (dedup by ISRC).
- 5 new Rust unit tests (halves, merge, duet ranking, dual ranking, duet primary).
Validation: cargo test (73 passed), cargo fmt --check clean, cargo clippy clean. No TS touched.
Relates #75, Relates #79, Relates #80, Fixes #82. #84 is provider-missing (see issue comment).
Activity
12Review · 4510fd7
✅ No blocking issues
Adds half-title and primary-artist text-search fallbacks to lrc.red matching to fix dual-script and duet misses. The biggest remaining risk was extra queries being skipped by a wrong-length hit, now gated on duration.
Confidence: 4/5 — both prior findings verified fixed in code with covering unit tests, though head CI was still running.
| Finding | Location | |
|---|---|---|
| ✅ Fixed | Wrong-duration exact hit suppresses fallbacks, then gets filtered | src-tauri/src/lyrics.rs:614 |
| ✅ Fixed | Dual-title split uses the leftmost same-kind dash | src-tauri/src/lyrics.rs:673 |
Review · c0c4125
⚠️ 2 open findings
This PR adds dual-script half-title and primary-artist text-search fallbacks to lrc.red matching, fixing the JANE DOE duet miss; the biggest risk is a wrong-length exact hit suppressing those new fallbacks before ranking drops it.
Confidence: 3/5 — CI is green and the new paths have unit tests, but the Medium finding can still produce a real miss for duets.
src-tauri/src/lyrics.rs:614src-tauri/src/lyrics.rs:673Prompt for all open findings
src-tauri/src/lyrics.rsaround lines 606-620, the halves and primary-artist fallbacks are skipped when duration-blindhas_exact_titleis true on unranked merged hits while finalrank_matchesfilters by duration; rank before gating or passduration_msintohas_exact_title.src-tauri/src/lyrics.rsaround lines 668-680,title_halvesusessplit_onceinstead ofrsplit_once; switch torsplit_onceso repeated identical spaced dashes split rightmost.