beets icon indicating copy to clipboard operation
beets copied to clipboard

Lyrics: Use distance threshold for Genius search matches

Open snejus opened this issue 1 year ago • 2 comments

Description

This PR introduces a distance threshold mechanism to the Genius backend and unifies its implementation across the rest of backends that perform searching and matching artists and titles.

  • Create a new SearchBackend base class with a method check_match that performs matching.
  • Start using undocumented dist_thresh configuration option for good, and mention it in the docs. This controls the maximum allowable distance for matching artist and title names.

These changes aim to improve the accuracy of lyrics matching, especially when there are slight variations in artist or title names.

Fixes #4791

To Do

  • [x] Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • [x] Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • [x] Tests. (Very much encouraged but not strictly required.)

snejus avatar Oct 08 '24 11:10 snejus

Have just discovered that it is not anymore possible to search lyrics on Tekstowo since search results are now shown within a Google container which is not parseable.

snejus avatar Oct 11 '24 23:10 snejus

Going to move the last commit with tekstowo change to a separate PR and handle this issue there.

snejus avatar Oct 11 '24 23:10 snejus

Superseded by #5474

snejus avatar Nov 22 '24 07:11 snejus