Commit graph

13043 commits

Author SHA1 Message Date
Sebastian Mohr
83eda27051
Update docstrfmt 2025-09-04 12:49:44 +01:00
Sebastian Mohr
d6e3548d4a
Formatting commands 2025-09-04 12:49:43 +01:00
Sebastian Mohr
1dfd232270
further reading formatting and changed extending the autotagger to
conform to new metadatasource plugin.
2025-09-04 12:49:43 +01:00
Sebastian Mohr
6627a0740c
Changed events doc list to table. Added references to api. 2025-09-04 12:49:43 +01:00
Sebastian Mohr
35ea9a7011
Enhanced index, changed wording slightly 2025-09-04 12:49:43 +01:00
Sebastian Mohr
69b47b3071
A number of smaller additions. 2025-09-04 12:49:43 +01:00
Sebastian Mohr
07549ed896
Moved plugin docs into folder. 2025-09-04 12:49:42 +01:00
Šarūnas Nejus
c60f0ceb3c
Add configurable search limit to Spotify and Deezer plugins, and make the option name consistent (#5960)
- Add configurable `search_limit` option to Deezer and Spotify plugins
(default 5) and enforce it when returning search results.
- Rename `musicbrainz.searchlimit` to `musicbrainz.search_limit` (old
key still read with deprecation warning; slated for removal in 3.0.0).
- Update docs and changelog to reflect the changes.
2025-09-04 12:42:52 +01:00
Šarūnas Nejus
17bc11034f
Limit search query results using request parameters 2025-09-01 04:36:54 +01:00
Šarūnas Nejus
20497d3d9b
Dedupe search_limit config option init 2025-09-01 04:10:53 +01:00
Šarūnas Nejus
a674fd3095
musicbrainz: Rename searchlimit config option to search_limit 2025-08-31 18:48:46 +01:00
Šarūnas Nejus
d00d51e0bf
Add configurable search_limit to Spotify and Deezer plugins 2025-08-31 18:48:46 +01:00
Šarūnas Nejus
b1c93552a3
Replace percent, string concat, format calls with f-strings (#5890)
This PR modernizes the codebase by replacing all `str.format()` calls,
`%` operator, and most of string concatenation with f-string literals.

Fixes #5293
Supersedes #5337

Once this is reviewed, I will squash all commits into one and add the
hash to `.git-blame-ignore-revs` file.
2025-08-30 23:19:45 +01:00
Šarūnas Nejus
99a060b01d
Exclude certain commits from git blame 2025-08-30 23:10:51 +01:00
Šarūnas Nejus
a0ae664ae0
Add a note about SQL injection 2025-08-30 23:10:22 +01:00
Šarūnas Nejus
3bc653b989
lyrics: xfail sweetslyrics end-to-end test 2025-08-30 23:10:22 +01:00
Šarūnas Nejus
44fda7ca0a
lyrics: use another beatles song for Lyricsmode
Lady Madonna apparently is gone from this website. ¯\_(ツ)_/¯
2025-08-30 23:10:22 +01:00
Šarūnas Nejus
b3d434f58f
Delegate attribute access to logging 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
e334e81d40
Use item.filepath instead of displayable_path in logging 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
d6b6ac3387
Replace logging f-strings with arguments 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
d93ddf8dd4
Do not use explicit indices for logging args when not needed 2025-08-30 23:10:21 +01:00
Šarūnas Nejus
2fccf64efe
Do not use backslashes to deal with long strings 2025-08-30 23:10:20 +01:00
Šarūnas Nejus
1c16b2b308
Replace string concatenation (' + ')
- Join hardcoded strings
- Replace concatenated variables with f-strings
2025-08-30 23:10:15 +01:00
Šarūnas Nejus
a7c83d91e9
Replace slightly more advanced attempts to use format calls 2025-08-30 22:35:00 +01:00
Šarūnas Nejus
9352a79e41
Replace percent formatting 2025-08-30 22:35:00 +01:00
Šarūnas Nejus
4a361bd501
Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
Sebastian Mohr
6c21482b7a
Avoid Unidecoding Query Strings in Deezer Metadata Plugin (#5882)
Moved the `_construct_search_query` method that was duplicated in the
spotify and deezer plugins into the (new) shared helper baseclass (
`SearchApiMetadataSourcePlugin`).

By default deezer now also does not ascii encode a query when it is send
but the legacy behaviour can be restored using the
`deezer.search_query_ascii` option.

closes #5860
2025-08-26 13:46:47 +02:00
Sebastian Mohr
279c828369 run docstrfmt 2025-08-26 13:41:11 +02:00
Sebastian Mohr
014831b588 Reformulated docs to make the reference less strong. 2025-08-26 13:41:11 +02:00
Sebastian Mohr
1c0484c4ba renamed keywords to query_string, shortened query construct expression,
removed legacy isinstance check
2025-08-26 13:41:11 +02:00
Sebastian Mohr
abffa7900b Fixed tests as query formatting changed slightly. 2025-08-26 13:41:11 +02:00
Sebastian Mohr
f81684e188 Moved construct search into SearchApiMetadataSource to dedupe some
deezer and spotify functionalities.
2025-08-26 13:41:11 +02:00
Šarūnas Nejus
e208d4bee3
chroma: set a default timeout of 10 seconds (#5898)
This prevents the `chroma` plugin from hanging the entire import process
if the AcoustID API fails to respond.
2025-08-25 23:46:44 +01:00
Šarūnas Nejus
e603c2f08e
Merge branch 'master' into chroma-timeout 2025-08-25 23:37:41 +01:00
Šarūnas Nejus
ee18b87e7d
docs: update discogs.rst - add default of index_tracks configuration option (#5935)
In the documentation of the Discogs plugin the ``index_tracks``
configuration option does not include the detail about the default
configuration that is applied when the option is not explicitly managed
in the configuration file.

If this PR is approved, the documentation will include that default ;)
2025-08-25 19:19:16 +01:00
Luccoli
535fcfdbe7 docs: update discogs.rst - add default of index_tracks configuration 2025-08-25 19:14:12 +01:00
Šarūnas Nejus
695ef29e69
docs: add 'pretend' flag to update command example (#5954)
Add `p` as an acceptable flag for the `update` command to match the long
form section of the command's docs
2025-08-25 19:03:35 +01:00
Ryan Waskiewicz
6408b5e280
Add 'pretend' flag to update command example
Add `p` as an acceptable flag for the `update` command to match the long form section of the command's docs
2025-08-24 09:04:21 -04:00
Šarūnas Nejus
6a7bdd6328
Log loaded plugins at the debug level. (#5953)
Rather than clutter the output with (usually) unimportant information.
2025-08-24 13:18:45 +01:00
Šarūnas Nejus
f6a19c7b83
Merge branch 'master' into plugin-loading-debug 2025-08-24 13:13:24 +01:00
Šarūnas Nejus
2504595532
Lastgenre fix early whitelist check breaking canonicalization (#5946)
Fixes #5930.  

- Removed whitelist check immediately after last.fm fetch, which fixes
canonicalization - also unwanted genres need to remain at this point to
get successfully resolved "up" to parent genres
- Removed the `_filter_valid_genres()` helper method and went back to
_inline_ list comprehensions (readability)
- Ensured bug #5649 does not regress (the part were a resolve would kick
out everything and no fallback happens) by running a full
`_resolve_genre()` in each stage - if no genres remain in a stage the
next one is hit.
- Refactored `_get_genre` using a local helper method and returning
immediately on a satisfying outcome (Commits
d28738d92f
and
bb516a3a9c)
- Three new `test_get_genre` cases proof canonicalization works properly


Unrelated tiny fixes along the way:
- Clarified `--keep-existing` option docs
- Ensured list return type in `_last_lookup()`
2025-08-24 08:26:05 +01:00
J0J0 Todos
0dcf7fdc23 lastgenre: Remove leftover/unused REPLACE constant 2025-08-24 09:20:36 +02:00
J0J0 Todos
efa968175b Changelog for #5946 2025-08-24 09:20:36 +02:00
J0J0 Todos
a1efd2836a lastgenre: Clarify keep-existing precedence in docs 2025-08-24 09:20:36 +02:00
J0J0 Todos
05a1a95ee9 lastgenre: Dedup combine/resolve/label/format code 2025-08-24 09:20:36 +02:00
J0J0 Todos
d8e90d8e54 lastgenre: Resolve combined genres in each stage
To ensure proper fallback to the next stage, in each stage we do a full
combine/resolve/log.

Also we directly return if have satisfied results. As a bonus this
improves readability.

Some duplicate code on the label magic though...
2025-08-24 09:20:36 +02:00
J0J0 Todos
f85ba7ab3b lastgenre: Fix test_get_genre loading whitelist
- The default whitelist files were not loaded properly (at least in
  local test environments, not sure about CI yet...anyway...)
2025-08-24 09:20:36 +02:00
J0J0 Todos
fa8b5d7495 lastgenre: Fix canonicalization of non-valid genres
- Remove "early whitelist check", since it breaks canonicalization of
  actually unwanted genres (not whitelisted) resolving "up" to parent
  genres.
- Remove the filter_valid_genres method entirely and get back to inline
  list comprehensions. The caveat is that None genres are not catched
  that way (see below, should be one of the last functions that finally
  returns lists only)
- Along the way, fix _last_lookup's rearly return to empty list instead
  of None.
2025-08-24 09:20:36 +02:00
J0J0 Todos
7f7b900f1b lastgenre: Test canonicalization
- Test non-whitelisted genres resolving "up" in the tree.
- Test whitelisted original and whitelisted new genre resolving "up"
- Test non-whitelisted original genre resolving "up" (and deduplication
  works)
2025-08-24 09:20:36 +02:00
David Logie
d87b80bd51 Log loaded plugins at the debug level. 2025-08-23 13:11:58 +01:00