rekordbox_set_list_manager.services.track_matcher#
Multi-strategy track matcher: links Spotify tracks to local Rekordbox files.
Classes#
Strategy used when matching a streaming track to a local collection entry. |
|
Result of matching one Spotify track against a local collection. |
|
Match a list of Spotify tracks against a local (Rekordbox) collection. |
Module Contents#
- class rekordbox_set_list_manager.services.track_matcher.MatchStrategy[source]#
Bases:
enum.EnumStrategy used when matching a streaming track to a local collection entry.
- class rekordbox_set_list_manager.services.track_matcher.MatchResult[source]#
Result of matching one Spotify track against a local collection.
- spotify_track: rekordbox_set_list_manager.models.track.Track[source]#
- local_track: rekordbox_set_list_manager.models.track.Track | None[source]#
- strategy: MatchStrategy[source]#
- class rekordbox_set_list_manager.services.track_matcher.TrackMatcher[source]#
Match a list of Spotify tracks against a local (Rekordbox) collection.
Strategies are tried in priority order: 1. ISRC exact match 2. Artist + title exact match (case-insensitive) 3. Fuzzy title+artist match (thefuzz token_sort_ratio ≥ threshold) 4. Filename-based match (parse stem as “Artist - Title”)
- match(spotify_tracks, collection)[source]#
Return one
MatchResultper spotify track.- Parameters:
- Returns:
One result per input track, in the same order as spotify_tracks.
- Return type:
list[MatchResult]