lastgenre: Album stage fall back to multi-valued albumartists - #6893
lastgenre: Album stage fall back to multi-valued albumartists#6893JOJ0 wants to merge 3 commits into
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
58675e5 to
054d241
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## lastgenre_improve_original_fallback #6893 +/- ##
=======================================================================
+ Coverage 75.73% 75.74% +0.01%
=======================================================================
Files 164 164
Lines 21443 21455 +12
Branches 3379 3382 +3
=======================================================================
+ Hits 16239 16251 +12
Misses 4405 4405
Partials 799 799
🚀 New features to boost your workflow:
|
054d241 to
08557bd
Compare
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
251def4 to
e8e5265
Compare
e8e5265 to
95086dc
Compare
There was a problem hiding this comment.
Pull request overview
PR make lastgenre album stage smarter for multi-artist albums. When Last.fm give no album tags for main albumartist, plugin now try album lookup for each value in multi-valued albumartists, then still fall through to artist stage if nothing found.
Changes:
- Add
_try_resolve_album_stagehelper to hold album-stage logic and multi-valuedalbumartistsfallback. - Add focused unit test that exercises per-albumartist album lookup fallback.
- Document new multi-artist album behavior in
lastgenredocs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
beetsplug/lastgenre/__init__.py |
Add album-stage helper that falls back to per-albumartists album lookups when primary album lookup empty. |
test/plugins/test_lastgenre.py |
Add direct test for _try_resolve_album_stage fallback behavior. |
docs/plugins/lastgenre.rst |
Document album-stage fallback to multi-valued albumartists before artist source. |
| resolved := self._try_resolve_stage( | ||
| "multi-valued albumartist album", | ||
| keep_genres, | ||
| multi_album_genres, | ||
| artist=None, | ||
| ) |
There was a problem hiding this comment.
I suggest we fix the other places instead. this is difficult to read. multi-valued albumartist album is ok - well already odd but good enough. Or invent something new entirely? Help grug!
| assert plugin._try_resolve_album_stage(item, []) == ( | ||
| ["Rock"], | ||
| "multi-valued albumartist album, any", | ||
| ) |
There was a problem hiding this comment.
we don't change it. so this is not required.
Try and concatinate genres of each member of albumartists in the multi-valued field if no genre for the main albumartist could be found.
95086dc to
e29ecb9
Compare
Description
Fixes: #6238
If last.fm returns no album genres for
albumartist, fall back to querying the album against each artist inalbumartists(falling through to the artist stage if that also yields nothing.)The album stage reasoning is now slightly more complex and was moved to its own helper method.
Note: Requires #6474
To Do