"Believe" was falsely matching "Believe In Me" because SequenceMatcher gives high scores when the search string is fully contained in the match. Added a length ratio penalty: when cleaned titles differ in length by more than 30%, the similarity score is multiplied by the ratio (min/max length). This crushes prefix/suffix false positives while leaving exact matches and cleaned variants (remastered, deluxe) unaffected. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| music_library.db | ||