Try to match the exact title and artist/album first (case-insensitive via StringQuery),
only then fall back to the previous substring matching.
This helps in cases where multiple variants of a song with distinct listen counts exist, like "Song" and "Song (inst.)" or "Song (Japanese ver.)".
This commit stops "Song" from also updating those separate variants if an exact match of "Song" exists.
Nonetheless, if the library only has an item named "Song (feat. Artist)", "Song" will still update its play count through the substring match.
The query was previously written as `(title && artist) || (title && album)`, which is distributively the same as `title && (artist || album)`.
Rewriting it clarifies the intent, where the title must match and the artist or album confirms the match.
Previously, all matchers were simply OR'd together, so the preference for MBID matches stated in the comments wasn't really applied.
Instead, listens with an MBID match could also update tracks with a different MBID, just because they had a substring match on their title.
For example, a listen for "Song" would also update play counts for "Song (inst.)", even though the library already contained "Song" with the listen's exact MBID and the instrumental has a different one.
- plugin functions currently unimplemented
- added authentication flow (pcke)
- added api layer to abstract communication with tidal (similar to spotify)
- added a general Request RateLimiter as I have seen that tidal will penalize
you pretty rough if you make more requests than expected.
Each song.store() was opening and committing its own SQLite transaction.
With thousands of unique tracks the WAL grows and each successive write
becomes slower. Wrapping the loop in a single transaction makes writes
O(1) per item instead of progressively slower.
Move MusicBrainzPlugin to SearchApiMetadataSourcePlugin hooks.
Keep entity mapping and criteria in provider-specific hooks.
Update typing and tests for the candidate search path.
* master: (37 commits)
importsource: Test skip, Test reimport-skip
Fix initial importsource plugin #4748 changelog
importsource: fix potential prevent_suggest_removal crash
Ensure that inc are joined with a plus
Add retries for connection errors
Add Usage block to RequestHandler
Refactor HTTP request handling with RequestHandler base class
Make musicbrainzngs dependency optional and requests required
musicbrainz: remove error handling
musicbrainz: access the custom server directly, if configured
musicbrainz: browse directly
musicbrainz: search directly
musicbrainz: lookup recordings directly
musicbrainz: lookup release directly
Move pseudo release lookup under the plugin
Add missing blame ignore revs from musicbrainz plugin
Define MusicBrainzAPI class with rate limiting
Move TimeoutSession under beetsplug._utils
expand tests to include check for track artists
remove changes for lastgenre as there was an existing PR for that work
...