Commit Graph
19 Commits
Author SHA1 Message Date
Maxr1998 fce53eafdf playcount: prefer exact title/artist/album matches over substring matches
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.
2026-09-07 08:20:07 +01:00
Maxr1998 c1abc55188 playcount: prefer an exact MBID match over title queries
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.
2026-09-07 08:20:07 +01:00
Sebastian Mohr 54a2bd20e1 Removed This file is part of beets... headers. 2026-06-29 11:20:15 +02:00
Šarūnas Nejus 1d9ff50608 Refactor plugin tests to use shared helpers
- Replace local setup fixtures with existing test helper base classes to reduce
  duplicated test setup.
2026-06-17 18:56:27 +01:00
Sebastian Mohr adfb73b66d Run ruff format 2026-05-20 16:53:06 +02:00
Sebastian Mohr a8db8931b7 test_playcount: Removed capture_log in favor for pytest caplog 2026-04-30 14:41:25 +02:00
Sebastian Mohr 290837222b Added a few tests for the RateLimitAdapter 2026-04-20 20:55:47 +02:00
Šarūnas Nejus 9394f1b223 Normalize dashes to underscores in musicbrainz data fields 2026-04-12 16:21:30 +01:00
Šarūnas Nejus db7c753ebe Update listenbrainz accordingly 2026-03-31 01:36:08 +01:00
Šarūnas Nejus d7c9e268f9 Refactor process_tracks and add tests 2026-03-31 01:36:08 +01:00
Šarūnas Nejus 1271b711f7 Format MusicBrainz search terms and escape Lucene special chars
Add a helper to lower/strip and escape Lucene query syntax.
Use it when building search queries and add unit tests.
2026-02-07 22:26:17 +00:00
Kirill A. Korinsky 48c954edf6 Nuked tests 2026-01-30 00:46:13 +00:00
Kirill A. Korinsky 47b1644110 Attemt to rework tests 2026-01-30 00:46:13 +00:00
Kirill A. Korinsky 78b6d537b6 Retries with 1, 2, 4, 8, 16, 32s backoff
At least it allows me to more or less use MusicBrainz
2026-01-30 00:46:13 +00:00
Šarūnas Nejus 55b9c1c145 Retry on server errors too 2026-01-06 09:54:02 +00:00
Šarūnas Nejus 92352574aa Migrate mbcollection to use MusicBrainzAPI 2026-01-06 09:54:02 +00:00
Šarūnas Nejus 523fa6ceaf Move MusicBrainzAPI to a shared util 2026-01-06 00:26:41 +00:00
Šarūnas Nejus d1aa45a008 Add retries for connection errors 2025-12-21 01:03:20 +00:00
Sebastian Mohr 4782e96599 Move vfs.py to beetsplug._utils package to avoid polluting core namespace (#6017)
This PR moves the `vfs.py` module, which is only used by plugins, to
avoid polluting the main beets namespace. Also exposes the `vfs` and
`art` module from beets with a deprecation warning.
2025-10-01 12:28:18 +02:00