Commit Graph
880 Commits
Author SHA1 Message Date
Šarūnas Nejus 27900f58fb Prefer imports from modules that provide import aliases 2026-08-18 23:20:39 +01:00
Šarūnas Nejus 4aa5aa62ac typing: fix types in beetsplug._utils.art 2026-08-18 23:20:38 +01:00
Šarūnas Nejus 1969622874 typing: fix types in event handlers 2026-08-18 10:46:33 +01:00
J0J0 Todos 5b0e9e94cd lastgenre: Test new fetch_va_genres helper 2026-08-18 07:01:09 +02:00
Šarūnas Nejus d53af83386 Serialize BPD notifications per connection
- Track active notification tasks by connection so repeated dispatches do not
  send duplicate idle responses while a previous send is still draining.
- Add regression coverage for serialized notification delivery and idle command
  disconnect handling.
2026-08-17 05:05:21 +01:00
Šarūnas Nejus 9b16f67af1 Remove bluelet in favor of using asyncio in bpd plugin 2026-08-17 05:05:21 +01:00
Henry b7993d19ac fix(discogs): retry malformed search responses #6912 2026-08-15 09:53:26 -07:00
Cohen Karnell d97d78f830 Fix KeyError in Deezer track conversion when artist is missing
_get_track resolved the artist with track_data.get('contributors', [track_data['artist']]),
whose default is evaluated eagerly, so track_data['artist'] raises KeyError whenever the
artist key is absent, even when contributors is present. Guard the fallback the same way
album_for_id already does. Fixes #4339.
2026-08-14 12:02:07 -04:00
Trey Turner afd07ce5d3 fix(discogs): retry malformed search responses 2026-08-11 16:04:08 -05:00
NoDancing f6b7e1f761 tidal: Normalize copyright text into a concise label name
_parse_label() used to store Tidal's raw copyright info as the label
name. Add _normalize_label(), a helper that strips leading markers,
years, legal entities, and boilerplate clauses.

Fixes #6796
2026-08-11 00:39:31 +01:00
Šarūnas Nejus 5933fcad85 Refactor template evaluation to handle format strings ONLY
- Handle formats as strings ONLY and evaluate them through a shared
  cached template helper.
- This removes the need for conditional logic that acts on Template
  objects or strings.
2026-08-05 01:56:59 +01:00
Šarūnas Nejus 03045b80e9 Merge branch 'master' into master 2026-08-04 16:45:30 +01:00
Piotr Szpetkowski 681f27feb6 fix(deezer): use free text for singleton searches
Singleton searches built the query as `<title> artist:"<artist>"`. Deezer
discards unquoted free text as soon as a query contains any field:"value"
filter, so that was evaluated as `artist:"<artist>"` alone - every track by
the artist, in Deezer's own relevance order, truncated to `search_limit`
(default 5). Substituting nonsense for the title returns a byte-identical
result set. For any artist with more releases than that window, the track
being imported was simply never among the candidates offered.

Filtering on the title as well (`track:"<title>" artist:"<artist>"`) is not
a fix: `artist:` matches loosely enough to return unrelated artists, so the
two filters can intersect to nothing even for a correctly tagged file.
`track:"Get Lucky" artist:"Daft Punk"` returns zero results, while the plain
free text `Get Lucky Daft Punk` returns the right track first.

Measured over 12 tracks at the default `search_limit`, counting the wanted
track appearing anywhere in the results:

  `<title> artist:"..."`              6/12, mean rank 1.50
  `track:"..." artist:"..."`          7/12, mean rank 1.00
  free text                          10/12, mean rank 1.00

Album searches are unchanged; `album:"<name>"` has no equivalent problem.

Adds test/plugins/test_deezer.py, which did not exist.
2026-07-30 21:18:59 +02:00
Alok Saboo 7a49cc4882 Merge branch 'master' into upgrade 2026-07-30 09:11:46 -04:00
Šarūnas Nejus bb66b0c378 Return Path from TestHelper.create_mediafile_fixture 2026-07-30 12:18:49 +01:00
Šarūnas Nejus b2f52ac124 Remove syspath 2026-07-30 12:18:49 +01:00
Šarūnas Nejus 951e32a852 Use pathlib.Path wherever possible in tests 2026-07-30 12:18:49 +01:00
Šarūnas Nejus 04c2304879 Replace item.path with item.filepath in tests 2026-07-30 12:18:49 +01:00
Alok Saboo 789c13e4f7 Add bitrate-based upgrade duplicate_action 2026-07-28 19:51:30 -04:00
Šarūnas Nejus 5dcc35112d Fix yoda typedefs 2026-07-27 19:33:53 +01:00
Šarūnas Nejus 02a2c5700a Make RSRC a pathlib.Path 2026-07-24 17:03:57 +01:00
Šarūnas Nejus d24c0d341e Rename PathsMixin.temp_dir_path to PathsMixin.temp_path for consistency 2026-07-21 11:15:25 +01:00
Šarūnas Nejus 2e9ace7b20 Replace PathsMixin.temp_dir attribute with PathsMixin.temp_dir_path 2026-07-21 11:15:25 +01:00
Šarūnas Nejus dc2826fa4b Replace TestHelper.libdir attribute with TestHelper.lib_path 2026-07-21 11:15:25 +01:00
Šarūnas Nejus 7970a90214 Replace ImporterMixin.import_dir attribute with ImporterMixin.import_path
- Update importer fixtures and tests to use pathlib paths directly.
- Encode import paths only at the ImportSession boundary.
2026-07-21 11:15:25 +01:00
Šarūnas Nejus 3f277ad5a0 typing: feed PathLike as database path 2026-07-16 13:11:16 +01:00
Šarūnas Nejus 439a7fa75d discogs: Refactor _coalesce_tracks to make use of various tracks type_ 2026-07-16 11:57:10 +01:00
Šarūnas Nejus 8867848612 discogs: Add descriptions of each possible Tracks 2026-07-16 11:57:10 +01:00
Šarūnas Nejus c46f6a549b discogs: Dedupe test_strip_disambiguation 2026-07-16 11:51:32 +01:00
Šarūnas Nejus bbb1b5c1ef discogs: And now add full _coalesce_tracks coverage 2026-07-16 11:51:32 +01:00
Šarūnas Nejus bd9c753b99 discogs: Test index_tracks behaviour 2026-07-16 11:51:32 +01:00
Šarūnas Nejus b8f43e994a discogs: Test inherited track group artist 2026-07-16 11:51:31 +01:00
Šarūnas Nejus bc0591fdb6 discogs: Consolidate test_parse_tracklist_subtracks... tests 2026-07-16 11:50:58 +01:00
Šarūnas Nejus 1343d613d3 discogs: Move test_parse_tracklist_positions... under TestTracklist 2026-07-16 11:50:58 +01:00
Šarūnas Nejus 951af6d3e8 discogs: Use a single global fixture to kill DiscogsPlugin.setup 2026-07-16 11:50:58 +01:00
Šarūnas Nejus a126a3aaa3 discogs: Use Release instead of Bag in tests 2026-07-16 11:50:58 +01:00
Šarūnas Nejus 69cdd58240 discogs: remove redundant check for required fields 2026-07-16 11:50:58 +01:00
Samad 4ccdcc90c9 replaygain: add metaflac backend
Add a MetaflacBackend that computes ReplayGain for FLAC files with metaflac --add-replay-gain and reads the values back with --show-tag. Only FLAC is supported. Includes docs, a changelog entry, and tests.
2026-07-15 22:22:07 +01:00
f1nn 0d65a46bbc lyrics: add lrcmux backend 2026-07-15 16:12:21 +02:00
J0J0 TodosandŠarūnas Nejus c51f5755f3 lastgenre: Whitelist/Tree fixes; Default aliases
- Fixes some inconsistencies in spelling in the data files we ship with
  the plugin as well as adds some new genres to both files that seem to
  be returned often by last.fm.
  - For some changes the default aliases feature helps to streamline
    inconsistencies that come from last.fm already.
- The default aliases file that ships with beets
  - Tests fixes that prove that most of the alias normalization patterns
    work as they are supposed to.

Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2026-07-15 16:04:51 +02:00
J0J0 Todos 3ce8c9bbf5 lastgenre: Tests for _filter_valid helper,
even though it's indirectly tested via resolve_genres tests and
elsewhere, it makes sense to keep them to help with future refactoring.
2026-07-15 16:04:51 +02:00
J0J0 TodosandŠarūnas Nejus 1674b5e7f9 lastgenre: Tests for genre alias normalization
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2026-07-15 16:04:51 +02:00
AleksZyro a6d576d039 Preserve null artpath in edit 2026-07-15 14:30:42 +01:00
Sebastian Cao 7d4f160c36 missing: honor -f/--format in album mode 2026-07-15 14:31:58 +08:00
AleksZyro 04f2c3e794 Improve subsonicupdate server error 2026-07-14 20:09:56 +02:00
Sebastian Mohr 19f944698d rewrite: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr 5364644238 replace: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr 9f75017d72 mpdstats: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr a06c4b4736 inline: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00
Sebastian Mohr ca2acfc28a tidal: PluginTestCase -> PluginTestHelper 2026-07-14 17:24:17 +02:00