-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support providing album information on singleton imports via Discogs #4854
Conversation
In DiscogsPlugin.get_albums() we already strip away the words "CD" and "disk". It makes sense to also remove "vinyl"
Hi @sampsyo thanks again for the suggestion for simplification of this feature's code: #4717 (comment) I finally managed to find time to refactor it and give your simplification idea a try. For the sake of comprehensibility I left the old code/PR in-tact and created this new and simplified one. Unfortunately applying a whole AlbumInfo object to the candidate TrackInfo object resulted in the following array while applying:
Without having investigated too much, it seemed to me that the TrackInfo objects generated during this early stage in the import process are passed all the way through to the database abstraction layer. where it finally wants to store this unsupported field. Removing it on this level again felt unnecessary complicated so I decided to go down an even simpler route of just applying, what I actually need, to the TrackInfo object: The What do you think about this solution? Also: Please a wording check of my additions to the docs: 1ab8ae8 |
1ab8ae8
to
70b9d22
Compare
Yes, looks like it's trying to assign the
Looks alright to me, we can still come up with a more elaborate solution should we ever need more album fields on |
c931c6c
to
a39ecff
Compare
Perfect! Thanks so much for the review! |
When available, display e.g: - Track Index as "Index 2" - Alternative Track name as "Track A2"
to the TrackInfo objects it returns. Additionally a new feature is introduced that uses string_dist to find the correct track on the Discogs album.
- If the file being imported has an album tag already, display it. - If the metadata plugin provides a new album value, preview the change.
conditions. Co-authored-by: Benedikt <wisp3rwind@posteo.eu>
0573088
to
ac34557
Compare
- New config option for the importer 'singleton_album_disambig' lets users choose whether they want to display [album names] in the list of candidates. Enabled by default but ony applicable if the candidate provides an album attribute. - Add docs describing the new option and which source plugins currently support it.
ac34557
to
a374977
Compare
Alright, I think I'm happy with this feature now. In the end I decided to additionally add the album name to the disambiguation string, which makes the selection of the "correct" release even more straight forward. Also I realized that it makes sense to make this globally configurable since the Spotify plugin will benefit from it as well and some users might find such a long disambiguation string distracting. See my additions to the inital PR description. I tried to explain as brief and clear as possible but nitpicking on my docs wording is always very welcome :-) a374977#diff-6d7bb6bc84b63dd7d8b09e64b4d5b117575f689ecb5a492c25b9aeeff1b5b38fR765-R774 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; however, I've only looked at the code changes in isolation, since I don't know the discogs plugin (in fact, any of the metadata sources) in detail.
Thanks @wisp3rwind, that's perfectly fine and helpful. Thanks for checking through! I'm happy to finally have merged this feature. I had been successfully using its first version for quite some time now, which shares parts of the Discogs plugin code we have here and I'm also very happy that now it's so much simpler than it was in the first place. (thanks again @sampsyo for the hints to simplify ;-))) |
Description
The Discogs metadata plugin now saves album information when importing singletons.
[Album]
can be turned off using a new configuration option:To Do
Tests.