• Aryan Noshirvnai's avatar
    Fix synced lyrics being silently skipped during tagging · 34fe74d2
    Aryan Noshirvnai authored
    The synced-lyrics lookup was only attempted when the identification
    candidate had no plain lyrics of its own - but Shazam and Gemini can
    both independently return a plain snippet as part of identification,
    which was short-circuiting the sync fetch entirely and silently
    discarding real timing data that was actually available. Now always
    attempted, with synced data (when found) always winning over whatever
    plain-text source identification provided.
    
    Also fixes the Discovery "give from shared library" path, which
    copied a source song's plain lyrics but not its synced_lyrics -
    copies given via Discovery were silently losing sync data even when
    the source had it.
    
    Existing tests never caught this because they always constructed a
    candidate with lyrics already stripped out; also fixes a shared
    mutable test fixture (FAKE_CANDIDATE) that the code under test
    mutates in place, which was silently leaking state between tests.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
    34fe74d2
test_music.py 12.5 KB