Šarūnas Nejus
db30e6b3b9
Fix typing issues in tests
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
8f53a2e86a
Make use of ReleaseFactory
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
00a9e4a19d
Introduce ReleaseFactory
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
dfceedc372
Refactor medium parsing
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
9a8d30bc51
Refactor parsing medium track
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
64d1ebe0e8
Use RecordingFactory in tests
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
4a05444102
Enforce asin, disambiguation, fix status
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
7d2dddcca5
Refactor parsing language and script
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
751c2c61c7
Refactor parsing label info
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
9be006a79d
Refactor parsing genre
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
4096ca6084
Use ReleaseGroupFactory
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
3318b539a8
Refactor date parsing
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
f0d712e8c5
Refactor _preferred_release_event
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
2b9bad71c5
Refactor _get_related_artist_names
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
1ab72230e0
Use ArtistFactory
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
0dcb216d4f
Remove _artist_ids
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
70df5de2a7
Use ArtistCreditFactory for test artist_credit construction
2026-02-01 16:06:26 +00:00
Šarūnas Nejus
c39c5021b3
Simplify multi artist credit parsing
2026-02-01 16:06:25 +00:00
Šarūnas Nejus
2754462c5a
Simplify aliases parsing
2026-02-01 16:06:25 +00:00
Šarūnas Nejus
b24e4504d9
Ensure correct data shape in recordings tests
2026-02-01 16:06:25 +00:00
Šarūnas Nejus
aa640e57b7
Rename track -> recording in tests for clarity
2026-02-01 16:06:25 +00:00
Šarūnas Nejus
78d7a94041
Simplify parsing recordings
...
This way we only ever handle full Recording objects.
2026-02-01 16:06:25 +00:00
Šarūnas Nejus
e0842c44db
Normalize dashes to underscores in musicbrainz data fields
2026-02-01 16:06:25 +00:00
Šarūnas Nejus
8f514eb6ab
Replace/fix Release.type with Release.primary-type
2026-01-31 18:05:18 +00:00
Arne Beer
4d7b9cb14b
fix(lastgenre): Canonicalize keep_existing fallback
...
Fixes a bug where existing tags were set to None, if they weren't whitelisted, but an whitelisted canonicalized parent existed up the tree.
In all other cases, the original genres are canonicalized and considered for the final genre, except in the keep_existing logic branch.
This PR fixes the issue and results in the expected behavior for this combination of options.
For the bug to trigger several conditions had to be met:
- Canonicalization is enabled and a whitelist is specified.
- `force` and `keep_existing` are set. Meaning, that Lastfm is queried for a genre, but the existing genres are still left around when none are found online.
- A release with a non-whitelisted genre exists, but that genre has a whitelisted genre parent up the tree.
- That very release has no genre on lastfm.
This is rather convoluted, but stay with me :D
What would happen is the following:
- `keep_genres` is set to the existing genres, as `force` and `keep_existing` is set.
- Genres for `track`/`album`/`artist` aren't found for this release, as they don't exist in lastfm.
- Then the `keep_existing` logic is entered.
- The old logic only checks if the existing genres have an **exact** match for the whitelist. In contrast to all other code branches, we don't do the `_try_resolve_stage` in case there's no direct match, resulting in no match.
- We continue to the fallback logic, which returns the fallback (`None` in my case)
This patch results in one last try to resolve the existing genres when `keep_existing` is set, which includes canonicalization (if enabled).
2026-01-31 13:22:56 +01:00
Kirill A. Korinsky
48c954edf6
Nuked tests
2026-01-30 00:46:13 +00:00
Kirill A. Korinsky
47b1644110
Attemt to rework tests
2026-01-30 00:46:13 +00:00
Kirill A. Korinsky
78b6d537b6
Retries with 1, 2, 4, 8, 16, 32s backoff
...
At least it allows me to more or less use MusicBrainz
2026-01-30 00:46:13 +00:00
Sebastian Mohr
6c52252672
Readded licence. Removed last legacy occurrences of artist and
...
replaced them with `field`. Removed unnecessary default parameters where
applicable.
2026-01-30 00:30:21 +00:00
Šarūnas Nejus
2aa7575294
Replace random.Random with random module
2026-01-30 00:30:21 +00:00
Sebastian Mohr
bcb22e6c85
Overall refactor of random plugin. Added length property to albums.
2026-01-30 00:30:21 +00:00
Sebastian Mohr
34e0de3e1f
Added typehints and some more tests.
2026-01-30 00:30:20 +00:00
Šarūnas Nejus
146c462e97
Merge branch 'master' into handle-404-in-reimport
2026-01-23 02:08:45 +00:00
David Logie
8769f8f8f0
Gracefully handle 404s when importing from MusicBrainz.
...
A 404 error can be raised when fetching from MusicBrainz in the case of
re-importing an album that has since been deleted from MusicBrainz.
2026-01-22 12:20:04 +00:00
Serene
39f65f6b11
Merge branch 'master' into embedart-clear-improvements
2026-01-20 08:43:30 +10:00
Henry
ff95ce5d20
Remove utils, rework from_plugin method in ArtistState to from_config
2026-01-19 12:43:30 -08:00
Šarūnas Nejus
7d83a68bdd
Ensure all fields in artist dicts in tests
2026-01-19 12:43:30 -08:00
Šarūnas Nejus
b3183a73e0
Simplify building artist
2026-01-19 12:43:30 -08:00
Šarūnas Nejus
59e7c59172
Move building logic to dataclasses
2026-01-19 12:43:30 -08:00
Henry Oberholtzer
2d406a3ca5
Add comments, clean up types.
2026-01-19 12:43:30 -08:00
Henry
459fd39768
Fix behavior when ANV does not exist
2026-01-19 12:43:30 -08:00
Henry Oberholtzer
08a2c248b9
Fix handling of commas and semicolons in artist join
2026-01-19 12:43:30 -08:00
Henry
f0aef6e213
Cleanup for #6177 , #6068
2026-01-19 12:43:27 -08:00
Henry
1d6e05709e
Fix #6068 - Multivalue fields are now supported & tested.
2026-01-19 12:41:36 -08:00
Henry
9efe87101c
Fix #6177 , remove derived types, refactor coalesce tracks
2026-01-19 12:40:42 -08:00
Šarūnas Nejus
1c20e4bd4e
Address RUF012
2026-01-13 20:55:40 +00:00
Šarūnas Nejus
c52656fb0a
Enable RUF rules
2026-01-13 20:55:40 +00:00
Šarūnas Nejus
b964d8b7eb
Configure future-annotations
2026-01-13 20:55:40 +00:00
David Logie
3ea4bb7941
Fix bug in fetching preferred release event.
...
With the changes to how data is fetched from MusicBrainz, empty releases
are now `None` instead of an empty dict.
2026-01-13 13:16:09 +00:00
Henry Oberholtzer
f7b05cb7db
ftintitle: fix changelog conflict
2026-01-08 12:20:25 -08:00