Commit graph

4430 commits

Author SHA1 Message Date
Šarūnas Nejus
2d776a8a22
Add ability to set temporary music dir context for ipfs 2026-03-23 19:32:55 +00:00
Šarūnas Nejus
cd3bf6a836
Store paths relative to music dir in DB, expand on read
Move path relativization/expansion logic from Item._setitem/__getitem__
into dbcore layer (PathType.to_sql/from_sql and PathQuery), so all
models benefit without per-model overrides.

Propagate contextvars to pipeline and replaygain pool threads so the
library root context variable is available during background processing.
2026-03-23 19:31:47 +00:00
Šarūnas Nejus
6c9825392f
Store item paths relative to library directory
Convert item paths to relative on write and back to absolute on read,
keeping the database free of hardcoded library directory. Fix tests to
account for absolute path return values.
2026-03-23 03:34:15 +00:00
Šarūnas Nejus
5fad834ad2
Ensure we use Distance to initialise Match objects 2026-03-22 19:23:53 +00:00
Šarūnas Nejus
df6f5c5826
import: simplify tagging item 2026-03-22 19:23:52 +00:00
kelamg
47148d5100 Fix formatting 2026-03-22 01:46:50 +00:00
kelamg
7556beb33a Revert docstring 2026-03-22 01:46:50 +00:00
kelamg
131930144b Update beetsplug/lyrics.py
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2026-03-22 01:46:50 +00:00
kelamg
b3bcb78349 Fix indentation 2026-03-22 01:46:50 +00:00
jochem
55b6fbe77d copied more generic implementation from snejus, and updated the tests and docs accordingly 2026-03-22 01:46:50 +00:00
kelamg
d4dc46591d Update beetsplug/lyrics.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-22 01:46:50 +00:00
kelamg
9a735df125 Fix formatting 2026-03-22 01:46:50 +00:00
jochem
2f9ee89b2a Added feature to exclude albums/songs during importing when auto is enabled, as requested in issue #3523. Also added corresponding tests and documentation. 2026-03-22 01:46:50 +00:00
Šarūnas Nejus
6eff971257
lastimport: rename flexible field because of the clash with mpdstats 2026-03-17 08:20:47 +00:00
J0J0 Todos
4431aebd40 Make extra_debug a BeetsLogger method 2026-03-17 07:49:05 +01:00
J0J0 Todos
870845d9c7 lastgenre: Polish method grouping comments wording 2026-03-17 06:52:30 +01:00
J0J0 Todos
9747d91557 lastgenre: Group all tree processing helpers together 2026-03-17 06:52:30 +01:00
J0J0 Todos
71a104bbdc lastgenre: Named types Whitelist and CanonTree 2026-03-17 06:52:30 +01:00
J0J0 Todos
c928c04ac2 lastgenre: Move fetching to client module 2026-03-17 06:52:30 +01:00
Andrejs Mivreniks
f9f4af874b feat(play): Add -R/--randomize option to play plugin 2026-03-16 20:33:23 +02:00
Brock Grassy
d21470042a Address comments 2026-03-16 06:52:35 +00:00
Brock Grassy
2c60c3eb49 Address comments and add new test case 2026-03-16 06:52:35 +00:00
Brock Grassy
4cef8c4093 Address review comments 2026-03-16 06:52:35 +00:00
Brock Grassy
7027060a0b Fix lint and mypy 2026-03-16 06:52:35 +00:00
Brock Grassy
6b62380b62 Change missing plugin to allow for filtering albums by release type 2026-03-16 06:52:35 +00:00
Šarūnas Nejus
a6fcb7ba0f
Fix references to color utils 2026-03-14 11:57:18 +00:00
Pierre Ayoub
ca9990c8c2 [beetsplug/spl] Fix linting error 2026-03-13 19:17:56 +00:00
Pierre Ayoub
aae0260484 [beetsplug/spl] Add the dest_regen/dest-regen option 2026-03-13 19:17:56 +00:00
Carson Jones
be722b564e Use va_name config for all artist fields on VA releases
When importing compilations, albumartist_sort, albumartists_sort,
albumartist_credit, albumartists_credit, and albumartists were
hardcoded to "Various Artists" instead of using the user-configured
va_name setting. This also fixes the same issue in the beatport plugin.

Fixes #6316
2026-03-12 23:00:32 -04:00
Jack
c0c84cebeb Format discogs plugin after review changes 2026-03-13 00:25:39 +00:00
Jack
ce451d5f34 Remove alias/tracks special case handling for new Discogs extra_tags function 2026-03-13 00:25:39 +00:00
Jack
76e862e691 Fix formatting: run ruff format on discogs plugin 2026-03-13 00:25:39 +00:00
Jack
04e5d0083d CI: skip discogs tests when discogs_client missing, guard empty items, reset config in test 2026-03-13 00:25:39 +00:00
jdoe29103
0d8d3bfadf Add discogs.extra_tags and updated documentation 2026-03-13 00:25:39 +00:00
Eric Masseran
548bd9bab6 Merge remote-tracking branch 'official/master' into use-aliases-for-track-album
* official/master: (54 commits)
  Require data_source in album_for_id and track_for_id functions
  Invoke album_matched hook from AlbumMatch.__post_init__
  Refactor match_by_id
  Take data source into account when deciding duplicate candidates
  Return album candidates from multiple sources when matching by IDs
  Add a test to reproduce the issue
  Move assignment tests to test/autotag/test_match.py
  Pulled latest changelog and added my entry to 'Unreleased > Bug fixes' section.
  Moved changelog note to top, under Unreleased.
  This PR improves the regex detection used for the drive_sep_replace default.
  This PR improves the regex detection used for the drive_sep_replace default.
  refactor: Use deprecate_for_user for beatport/bpsync deprecation warnings
  Fix docs: use single-line deprecated directive compatible with docstrfmt
  Fix docs formatting for beatport and bpsync rst files
  Deprecate beatport and bpsync plugins
  Update changelog.rst
  try to fix fish plugin
  Make get_search_query_with_filters abstract
  Document new methods
  Document shared metadata search plugin workflow
  ...
2026-03-10 08:52:31 +01:00
Eric Masseran
efd2b090b5 Copilot feedback 2026-03-10 08:52:08 +01:00
Šarūnas Nejus
35361a63b6
Require data_source in album_for_id and track_for_id functions
These functions now accept both an ID and data_source parameter,
enabling plugins like mbsync and missing to retrieve metadata from the
correct source.

Update mbsync and missing plugins to use the restored functions with
explicit data_source parameters. Add data_source validation to prevent
lookups when the source is not specified.

Add get_metadata_source helper function to retrieve plugins by their
data_source name, cached for performance.
2026-03-10 00:56:35 +00:00
Szymon Tarasiński
b008488b84 refactor: Use deprecate_for_user for beatport/bpsync deprecation warnings 2026-03-08 17:10:29 +00:00
Szymon Tarasiński
efa1f370b7 Deprecate beatport and bpsync plugins
Beatport has retired the API these plugins rely on, making them
non-functional. Add deprecation warnings and update documentation
to reflect the current state.

Fixes #3862
2026-03-08 17:10:29 +00:00
Konstantin
b64bda86ff try to fix fish plugin 2026-03-08 13:57:42 +01:00
Šarūnas Nejus
46aa0a4ba5
Make get_search_query_with_filters abstract 2026-03-08 09:06:00 +00:00
Šarūnas Nejus
0670611d7a
Document new methods 2026-03-08 09:00:14 +00:00
Šarūnas Nejus
9855d46901
Bound Spotify auth retry during search
Replace recursive 401 handling with a single retry loop.

This prevents unbounded recursion when authentication keeps failing.
2026-03-08 09:00:14 +00:00
Šarūnas Nejus
9b63985989
Migrate MusicBrainz to shared search hooks
Move MusicBrainzPlugin to SearchApiMetadataSourcePlugin hooks.

Keep entity mapping and criteria in provider-specific hooks.

Update typing and tests for the candidate search path.
2026-03-08 09:00:14 +00:00
Šarūnas Nejus
27bb34411c
Refactor shared search API flow
Move search orchestration into SearchApiMetadataSourcePlugin.

Migrate Deezer, Spotify, and Discogs to provider hooks.

Keep query handling, logging, and limits centralized.
2026-03-08 09:00:14 +00:00
Šarūnas Nejus
ace6a99d07
Document methods changed/introduced 2026-03-06 10:57:08 +00:00
Šarūnas Nejus
05a822dd5c
Move Lyrics class under beets.util as it is used by migrations 2026-03-06 10:57:08 +00:00
Šarūnas Nejus
50a564e66d
Set constant langdetection seed for stable results 2026-03-06 10:57:08 +00:00
Šarūnas Nejus
7d30efa82c
Migrate lyrics metadata to flex fields on library open
- Add `LyricsMetadataInFlexFieldsMigration` to extract legacy source
  URLs and language metadata from lyrics text into flex attributes
- Add `Lyrics.from_legacy_text` to parse legacy lyrics format
- Move `with_row_factory` context manager up to base `Migration` class
- Rename `migrate_table` to `migrate_model` and pass model class
  instead of table name string. This is so that the migration can access
  both `_table` and `_flex_table` attributes.
- Make `langdetect` import optional in `Lyrics.__post_init__`: users may
  not have have the dependency installed, and we do not want the
  migration to fail because of that.
- Move `BACKEND_BY_NAME` to module level for use outside plugin class
2026-03-06 10:57:08 +00:00
Šarūnas Nejus
7df14e1877
Fix timestamp format in translation/synced lyrics test 2026-03-06 10:57:08 +00:00