J0J0 Todos
e59521e375
lastgenre: tree/whitelist: Remove experimental
...
experimental, even though a tag last.fm very often returns (in top 20
tag charts!), it is too broad of a term to be pinned downed with any
particular genre, thus can't really be used for canonicalization.
2025-09-13 09:29:43 +02:00
J0J0 Todos
a98ba061e8
lastgenre: tree/whitelist: UK/Breakbeat Hardcore
...
Also changes decided during PR discussions and more research.
2025-09-13 09:29:43 +02:00
J0J0 Todos
9f442dcf75
lastgenre: tree/whitelist: Contributor feedback
...
that came up in the pull request comments and other discussions.
2025-09-13 09:29:43 +02:00
J0J0 Todos
4949f44e82
lastgenre: tree/whitlist: Jojo's essential fixes
...
Fixes to the beets default tree and whitlist files I collected over the
years; Includes Tags last.fm returns quite often; Also the
chart.getTopTags API endpoint was checked to make sure the top 100
charts are included in beets default tree and whitelist.
2025-09-13 09:29:43 +02:00
J0J0 Todos
7a5cfa8f46
lastgerne: Update wl/tree load methods docstrings
2025-09-10 07:36:47 +02:00
J0J0 Todos
d2caed3971
lastgenre: Also log which whitelist file is loading
2025-09-10 07:36:47 +02:00
J0J0 Todos
6601cbf8c0
lastgenre: canonical/whitelist setting None load default files
2025-09-10 07:36:47 +02:00
J0J0 Todos
6bc30eaf18
lastgenre: Add docstrings to file load methods
2025-09-10 07:36:47 +02:00
J0J0 Todos
6da72beeb0
lastgenre: Add expanduser to whitelist/tree load
2025-09-10 07:36:47 +02:00
J0J0 Todos
81d342b79f
lastgenre: Simplify default tree loading
2025-09-10 07:36:47 +02:00
J0J0 Todos
c54a54682f
lastgenre: Use pathlib and simplify whitelist load
...
- Read the whole file using Path().read_text()
- Strip whitespace and lower() transform
Drawbacks:
- Normalization gets lost (normpath did that)
2025-09-10 07:36:47 +02:00
J0J0 Todos
fbd90b0507
lastgenre: Use pathlib for opening tree file
...
instead of syspath(normpath())
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2025-09-10 07:36:47 +02:00
J0J0 Todos
0cdb1224b9
lastgenre: Fix c14n load log msg format
2025-09-10 07:36:47 +02:00
J0J0 Todos
bbde63d87e
lastgenre: Accept AI suggested use open() for tree file
...
instead of codecs.open(), which most probably is a relict of beets' Python2/3 compatibility area.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-09-10 07:36:47 +02:00
J0J0 Todos
a98fa054fe
lastgenre: Fix failing CI tests by using syspath
...
when loading c14n file.
2025-09-10 07:36:47 +02:00
J0J0 Todos
5ff88b46cf
lastgenre: Fix another mypy error in c14n load
...
(that was only happening in CI and not by local poe check-types)
2025-09-10 07:36:47 +02:00
J0J0 Todos
8ae29e42bf
lastgenre: Fix mypy errors in file load methods
2025-09-10 07:36:47 +02:00
J0J0 Todos
6ed17912b4
lastgenre: Fix _load_whitelist return type bytes
2025-09-10 07:36:47 +02:00
J0J0 Todos
bf903fc27d
lastgenre: Move file loading to helpers
...
and add return types.
2025-09-10 07:36:47 +02:00
Sebastian Mohr
e51de5de91
Removed data source as listenbrainz is not an metadata source plugin.
...
closes #5975
2025-09-04 17:41:12 +02: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
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
1c0484c4ba
renamed keywords to query_string, shortened query construct expression,
...
removed legacy isinstance check
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
e603c2f08e
Merge branch 'master' into chroma-timeout
2025-08-25 23:37:41 +01:00
J0J0 Todos
0dcf7fdc23
lastgenre: Remove leftover/unused REPLACE constant
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
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
Rebecca Turner
1786adfff1
chroma: set a default timeout of 10 seconds
...
TODO: Configurable timeouts :)
2025-08-10 23:14:20 -07:00
Šarūnas Nejus
54b31d01e9
Use only plugins/disabled_plugins config in plugin loading
2025-08-09 15:11:58 +01:00
Sebastian Mohr
6c3f93df2c
Replaced find_executable with shutil.which for python 3.12
...
compatibility as distutils was deprecated.
2025-08-09 13:17:27 +02:00
Šarūnas Nejus
9e4559b8e9
Merge branch 'master' into discogs-404
2025-08-08 21:57:46 +01:00
Rebecca Turner
0430bd383a
discogs: don't crash if a release is deleted
2025-08-07 20:25:09 -07:00
Sebastian Mohr
dc6f07d705
Added typing_extensions to all python version. Removed sys.version checks
2025-08-04 11:19:14 +02:00
Martin Atukunda
4a7e474efc
Merge branch 'master' into feature/add-artist-to-item-entry-template
2025-07-18 00:25:42 +03:00
Šarūnas Nejus
3be4a89aee
refactor: convert _types from class attributes to cached properties
...
Convert static _types dictionaries to dynamic cached class properties to
enable proper plugin type inheritance and avoid mutating shared state.
Key changes:
- Replace static _types dicts with @cached_classproperty decorators
- Update cached_classproperty to support proper caching with class names
- Remove manual _types mutation in plugin loading/unloading
- Add pluginload event and cache clearing for proper plugin integration
- Fix test to trigger type checking during item creation
This ensures plugin types are properly inherited through the class
hierarchy and eliminates issues with shared mutable state between
test runs.
2025-07-16 14:45:25 +01:00
Šarūnas Nejus
7509843517
Fix a generic type error and warnings in spotify
2025-07-16 14:15:27 +01:00