Commit 9a65fa5a authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Rank identify_audio candidates by confidence, not source order

Shazam's hit was always appended before AcoustID's, so every caller
(discovery_listen, _identify_tag_and_store) taking candidates[0] as
"the" match was really just picking "whichever source responded
first" - a lower-confidence Shazam hit would silently beat a
higher-scoring AcoustID one from the same batch. Now sorted by
confidence descending before returning, fixing ranking for Discovery,
Upload, and Telegram tagging at once since they all share this one
function.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 34fe74d2
Pipeline #1155 failed with stage
in 39 minutes and 5 seconds