Commit graph

4082 commits

Author SHA1 Message Date
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
john doe
1c3b58c7d8 Update discogs.rst
Formatting fix
2026-03-13 00:25:39 +00:00
jdoe29103
99eec9ec25 Update changelog 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
Andrey M.
079b0276b8
Update docs/changelog.rst
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2026-03-10 12:16:59 +00:00
Andrejs Mivreniks
c019d790c5 docs(installation): Remove redundant MacOS section from installation guide 2026-03-10 13:06:16 +02: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
Šarūnas Nejus
fcfa8ddfac
Invoke album_matched hook from AlbumMatch.__post_init__ 2026-03-10 00:56:35 +00:00
Šarūnas Nejus
85aa1d7a9c
Take data source into account when deciding duplicate candidates 2026-03-10 00:56:13 +00:00
spaceage64
fbe9495bdd Pulled latest changelog and added my entry to 'Unreleased > Bug fixes' section. 2026-03-10 00:25:02 +01:00
spaceage64
b8823dddde Merge remote-tracking branch 'origin/drive-separator-fix' 2026-03-10 00:14:25 +01:00
spaceage64
031c2a8aeb Moved changelog note to top, under Unreleased. 2026-03-10 00:09:32 +01:00
spaceage64
e14191ed05 This PR improves the regex detection used for the drive_sep_replace default. 2026-03-09 20:19:17 +00:00
spaceage64
7b26733e04 This PR improves the regex detection used for the drive_sep_replace default. 2026-03-09 11:07:37 +01:00
Szymon Tarasiński
bdb039c760 Fix docs: use single-line deprecated directive compatible with docstrfmt 2026-03-08 17:10:29 +00:00
Szymon Tarasiński
740db4d500 Fix docs formatting for beatport and bpsync rst files 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
d2705fef4e Update changelog.rst 2026-03-08 14:16:49 +01:00
Šarūnas Nejus
4cccb70921
Document shared metadata search plugin workflow
Add developer guidance for SearchApiMetadataSourcePlugin and its hooks.

Clarify migration advice for API-backed metadata source plugins.
2026-03-08 09:00:14 +00:00
Emil Hammarberg
1f2beb6d02 Format 2026-03-08 08:51:42 +00:00
Emil Hammarberg
763dc7ccb1 Fix empty literal error 2026-03-08 08:51:42 +00:00
Emil Hammarberg
8a57472224 Reword 2026-03-08 08:51:42 +00:00
Emil Hammarberg
654b76190c Clarify %if template behavior
Closes #4991
2026-03-08 08:51:42 +00:00
snejus
13665a5a55 Increment version to 2.7.1 2026-03-08 08:30:00 +00:00
Šarūnas Nejus
a8b34d2976
Pin docstrfmt>=2.0.2 and add --preserve-adornments flag 2026-03-08 08:19:55 +00:00
Šarūnas Nejus
a7325e7483
Skip langdetect-dependent tests when package is not installed
Add a `requires_import` pytest marker and `is_importable` fixture to
conditionally skip or adjust assertions based on whether optional
dependencies are available. Apply this to `langdetect`-dependent
language detection tests in lyrics and migration test suites.
2026-03-08 08:19:55 +00:00
snejus
156870419e Increment version to 2.7.0 2026-03-07 21:16:10 +00:00
Šarūnas Nejus
b3f5585849
Add a changelog note 2026-03-06 11:29:05 +00:00
Šarūnas Nejus
192217da5d
Format docs 2026-03-06 11:28:29 +00:00
Šarūnas Nejus
ae3a2e5729
Fix redirect URLs 2026-03-06 11:28:29 +00:00
Šarūnas Nejus
441c838387
Fix broken URLs 2026-03-06 11:28:29 +00:00
Šarūnas Nejus
3d0d032987
Replace http URLs with https 2026-03-06 11:28:29 +00:00
Šarūnas Nejus
e8605747d6
Document migrations 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
38708ae592
Refactor lyrics handling to use structured Lyrics object
* Introduce a `Lyrics` dataclass to carry text, source URL, and language
  metadata through fetch, translation, and storage paths.
* Return `Lyrics` from backends and plugin lookup methods instead of raw
  tuples/strings.
* Store backend name in `lyrics_source` derived from fetched URL root
  domain.
* Simplify translator flow to operate on `Lyrics`, reuse line splitting,
  append translations in-place, and record translation language
  metadata.
2026-03-06 10:57:08 +00:00
Šarūnas Nejus
82bfc03494
Preserve synced lyrics when fetched result is plain text
When lyrics.synced is enabled, avoid replacing existing synced lyrics with
newly fetched unsynced lyrics, even with force enabled.

Allow replacement when the new lyrics are also synced, or when synced mode
is disabled.
2026-03-05 15:36:59 +00:00
Šarūnas Nejus
24ca6abcfe
lyrics: validate synced lyrics duration 2026-03-05 15:34:32 +00:00
Eric Masseran
6abf7c43ae Fix typo 2026-03-04 22:39:33 +01:00
Eric Masseran
1fe5bad4b2 Merge remote-tracking branch 'official/master' into use-aliases-for-track-album
* official/master: (180 commits)
  feat(lastgenre): cleanup_existing
  convert: generate playlist entries from effective output paths
  Fix lint issues
  Move changelog note under Unreleased section
  Enable duplicate detection for as-is imports
  Force slow queries for FuzzyPlugin
  Add tests
  Add changelog note
  Match substrings fuzzily
  Fix lint
  Move test_autotag tests under test/autotag
  Keep missing multi-value fields as None instead of empty list
  Show that album genres are not applied to tracks
  autotag: refactor autotag tests to use single comprehensive test
  fix(lastgenre): Reset plugin config in fixtured tests
  fix(fetchart): prevent deletion of configured fallback cover art
  Move changelog note under unreleased section
  Update changelog note
  fix: ftintitle can handle a list of ampersanded artists
  Fix symlink tests for macOS
  ...
2026-03-04 22:21:03 +01:00
Arne Beer
13fe82f394 feat(lastgenre): cleanup_existing
Introduce a new lastgenre `cleanup_existing` flag.

It handles the case where canonicalization is desired on existing tags.
The new logic triggers if:
- `force`: False
- `cleanup_existing: True

Depending on whether `whitelist: True` or `canonical: True`, the genres
are then canonicalized and/or whitelisting is applied
2026-03-04 21:01:37 +01:00
Šarūnas Nejus
e90bda31d1
Merge branch 'master' into pr-fix-convert-ext 2026-03-04 15:24:54 +00:00
Šarūnas Nejus
c46f99a82b
Merge branch 'master' into pr-fix-convert-ext 2026-03-04 15:22:40 +00:00
Šarūnas Nejus
bf7997d45f
Move changelog note under Unreleased section 2026-03-04 14:32:44 +00:00
Axel Wikström
b5d8ced9d9 Enable duplicate detection for as-is imports
When importing with autotag=no, duplicate detection was skipped entirely
because the import_asis stage called _apply_choice() directly without
first calling _resolve_duplicates(). This meant the duplicate_keys and
duplicate_action config options were ignored for as-is imports.

This was a known limitation documented by a FIXME comment added in
commit 79d1203541 (Sep 2014): "We should also resolve duplicates when
not autotagging." The FIXME was later removed during a comment cleanup
(f145e3b18) but the issue was never addressed.

This commit adds the _resolve_duplicates() call to import_asis, ensuring
duplicate detection works consistently regardless of the autotag setting.
This applies to both album imports and singleton imports.

Test changes:
- Renamed test_no_autotag_keeps_duplicate_album to
  test_no_autotag_removes_duplicate_album to verify the corrected behavior
- Added test_no_autotag_removes_duplicate_singleton to verify singleton
  duplicate detection also works with autotag=no

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-04 14:26:13 +00:00
Šarūnas Nejus
48763eee4f
Force slow queries for FuzzyPlugin 2026-03-03 14:05:35 +00:00
Šarūnas Nejus
56e86a7966
Add changelog note 2026-03-03 13:53:12 +00:00
Šarūnas Nejus
503d5c75ff
Merge branch 'master' into bugfix_editor 2026-03-03 12:03:52 +00:00
Šarūnas Nejus
1838482c7a
Keep missing multi-value fields as None instead of empty list 2026-03-03 07:48:51 +00:00