Add BPSyncPlugin - #3389
Merged
Merged
Conversation
Member
|
Nice!! This looks great. I do think it would be a good idea to land this self-contained version—and then consider factoring out another base class, if that makes sense, in a second pass. |
Contributor
Author
|
@sampsyo, this is ready for a review whenever you're free! |
sampsyo
requested changes
Oct 5, 2019
sampsyo
left a comment
Member
There was a problem hiding this comment.
Looks great so far! Here are a few suggestions.
rhlahuja
commented
Oct 6, 2019
| return [self.album_for_id(album_id=a['id']) for a in albums] | ||
| results = self._search_api(query_type='album', filters=query_filters) | ||
| albums = [self.album_for_id(album_id=r['id']) for r in results] | ||
| return [a for a in albums if a is not None] |
Contributor
Author
There was a problem hiding this comment.
This bit logic along with this early return were added to exclude "empty" (0-track) albums I encountered such as https://www.deezer.com/us/album/6979394.
sampsyo
approved these changes
Oct 6, 2019
sampsyo
left a comment
Member
There was a problem hiding this comment.
Awesome; this looks great! Thanks for all your work on both the new plugin and some refactoring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a proof-of-concept for a
bpsyncplugin, Beatport's equivalent ofmbsync. It allows users to sync changes to Beatport metadata and "backfill" new fields recently added in #3372.I'm considering abstracting this functionality into a
SyncMetadataSourcePluginbase class (similar toMetadataSourcePluginintroduced in #3355) which can also be leveraged for Spotify/Deezer/MusicBrainz, although that requires some larger refactors ofBeatportPluginandMBSyncPlugin, perhaps better suited for a separate PR?@sampsyo, what do you think? Is it worth putting the finishing touches on this Beatport-specific plugin, or investing time in a
SyncMetadataSourcePluginto future-proof?This PR also closes #3387 by properly assigning
genreand renamingmusical_keytoinitial_key.Note: I had to run
on my database to avoid raising
AttributeError: 'TrackInfo' object has no attribute 'musical_key'whenautotag.apply_metadata(album_info, mapping)is called.