Dedicated flex attrs for Deezer, Beatport album ID

- Similar to what the Spotify plugin does, on imports we save to a field
  `..._album_id` (spotify_album_id, deezer_album_id, beatport_album_id)
- It would be good to submit such a change to the 3rd-party plugins beetcamp
  and beatport4 as well (beatport_album_id, bandcamp_album_id).
- We might need to investigate why none of these
  flex attr fields get populated to the beets album level (`beet info -a`,
  album_attributes db table), it is only available at the item level (`beet
  info`, item_attributes db table). This should be tackled in a future
  issue/PR.
This commit is contained in:
J0J0 Todos 2023-03-26 13:10:28 +02:00
parent 2e5394246f
commit 5bf4e3d92f
2 changed files with 2 additions and 0 deletions

View file

@ -432,6 +432,7 @@ class BeatportPlugin(BeetsPlugin):
tracks = [self._get_track_info(x) for x in release.tracks]
return AlbumInfo(album=release.name, album_id=release.beatport_id,
beatport_album_id=release.beatport_id,
artist=artist, artist_id=artist_id, tracks=tracks,
albumtype=release.category, va=va,
year=release.release_date.year,

View file

@ -98,6 +98,7 @@ class DeezerPlugin(MetadataSourcePlugin, BeetsPlugin):
return AlbumInfo(
album=album_data['title'],
album_id=deezer_id,
deezer_album_id=deezer_id,
artist=artist,
artist_credit=self.get_artist([album_data['artist']])[0],
artist_id=artist_id,