Discogs: fixes for: 6177, 6068#6179
Conversation
91ece4c to
d68514e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6179 +/- ##
==========================================
+ Coverage 68.73% 68.76% +0.03%
==========================================
Files 138 140 +2
Lines 18555 18610 +55
Branches 3058 3051 -7
==========================================
+ Hits 12753 12797 +44
- Misses 5152 5165 +13
+ Partials 650 648 -2
🚀 New features to boost your workflow:
|
This comment was marked as resolved.
This comment was marked as resolved.
f0902d3 to
cb4b4fc
Compare
cb4b4fc to
ec23eec
Compare
f1e1620 to
21a6456
Compare
semohr
left a comment
There was a problem hiding this comment.
I just had some time to have a look here. Added some comments for potential improvements.
Thanks for starting to tackle the discogs plugin, it is in dire need of some love 😄
|
Thanks Sebastian! I'm out of town at the moment but will get these applied once I'm back. |
|
No hurry! Take your time and enjoy the holidays. |
|
Updated the variable name - can go ahead and merge if all looks good! |
|
I think @snejus wants to have a look too since he self assigned this to himself too. |
snejus
left a comment
There was a problem hiding this comment.
Sorry that it took me a long time to finally get to this! Well done, this is a big and important piece of work.
It seems to me that DiscogsPlugin now has a bit too many responsibilities. I think it would be a good idea to move the logic from _build_* methods to intermediate dataclasses which should make it easier for us to reason about it all and hopefully simplify the logic. I refactored a couple of bits as I reviewed this, so I'm opening a PR based from your last commit for you to review!
|
See #6277 |
|
Split the plugin into four files since it's been feeling a bit unwieldy to sort through. Happy to undo or change the reorganization, but I think it's a bit easier to understand and navigate now. |
snejus
left a comment
There was a problem hiding this comment.
Mostly looks good - we will want to move the subtracks merging functionality under TracklistState but this can be done in a separate PR :)
e099e02 to
03e2b0d
Compare
03e2b0d to
00198dc
Compare
00198dc to
9b1bd5d
Compare
|
Glad to finally have this fix in, now I can start thinking about all the other little improvements that are still left to make on the plugin... |
Description
Fixes #6177, #6068.
I fixed the issue in #6177 by removing the derived class interface, and moving those fields back into function variables. They're a bit unwieldy still, but that's the algorithm it came with. There's a lot of room to continue to improve the clarity of the code in that section, but I think that'll require a deeper overhaul.
For #6068, I created the
ArtistInfoandAlbumArtistInfotyped dictionaries, and was able to centralize the logic of building the artist info intobuild_artistinfoandbuild_albumartistinfo. Tests for these scenarios were created largely by expanding existing tests to incorporate the new fields.I think I'll have to re-think the entire algorithm for 6030 to make it more flexible at parsing the issue for #6030, so I'll move that to a later PR in the interest of getting the flex attr fix in.
To Do
docs/changelog.rstto the bottom of one of the lists near the top of the document.)