-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract code for creating similar artists to a separate class #1559
Extract code for creating similar artists to a separate class #1559
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1559 +/- ##
==========================================
- Coverage 72.09% 72.08% -0.01%
==========================================
Files 362 363 +1
Lines 6754 6761 +7
Branches 499 496 -3
==========================================
+ Hits 4869 4874 +5
- Misses 1476 1483 +7
+ Partials 409 404 -5 ☔ View full report in Codecov by Sentry. |
I'm on standby on this topic and waiting for feedback. IMO this is a low hanging fruit for improving all metadata providers and consolidating the code.. |
Thanks, I need to dedicate some focused time to checking this out. I'm clearing my backlog successively and will get back to it today or tomorrow, same as with your other PR. |
Ok, I looked through the code and here are my comments:
|
I was pretty sure that the name wouldn't remain like that. The class creates
I wouldn't discard one type of test in favor of another. IMO it's better to just add additional tests.
I personally switch between Discogs and Bandcamp for metadata as they provide mutually exclusive information in some cases. Some artist (specifically independent, not-very-commercial ones) can't be found on Discogs or even have Bandcamp specific releases. The other way around, many popular artists don't bother with Bandcamp. I personally don't care much about the other metadata providers.
Is a strategy really a strategy if there are no alternatives? Where would the choice for the strategy be made? I'll try to come up with a constructive way for abstracting and reusing the LastFM metadata. |
It could be a selectable plugin. Conceptually there is som overlap between this and the functionality that provides the autoradio feature. I experimented with having other providers there as well, but maybe most users don't care about that and just want to see a nice populated list.
Ok, I agree and I'd like to see where you end up with this. Take as much time as you need. |
Seeing as to how this topic takes so much time to move forward (my fault, no time), I suggest splitting the topics (fix, refactoring and conceptual discussion):
Having things separate would at least allow us to move some of these aspects forward while others are still being clarified. What do you think? |
I'm sorry but I currently don't have the time to work on the enhancement regarding the LastFM metadata. Maybe I'll pick it up in the future. |
No problem, we could close this PR for the time being, and then you can reopen it when you have more time. Is that ok? |
My suggestion would be to take the fix for now, but anything else is also alright for me. Please close or merge the PR, as you wish |
Ok, I'll merge what we've got now, thanks for contributing. |
Addresses #1558.
This PR isolates the code for creating SimilarArtists from the Discogs metadata provider with the intent to reuse it in other metadata plugins which do not properly resolve similar artist images properly.
The first commit represents a draft of how the extracted code could be used (as a separate instance field).
The field could also be added in the MetaProvider class, since all plugins would use it.
IMO we could also (in a separate step) isolate all LastFm-related metadata operations to a separate class, to make them safe and consistent and tested.
@nukeop , I need your feedback. Should we proceed by reusing the code as a field? Each metadata provider would implement the same field, which looks kind of redundant. Or do you have a different pattern in mind?
Also, I locally adjusted the affected metadata providers and they work fine. Since the adjustments are simple, I could add them to this PR, or create a separate PRs if it's easier for you to reveiw - I have no personal preference.