From 5bf4e3d92f5b4010a19cd3e8222fbf28b7b844e0 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Sun, 26 Mar 2023 13:10:28 +0200 Subject: [PATCH] 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. --- beetsplug/beatport.py | 1 + beetsplug/deezer.py | 1 + 2 files changed, 2 insertions(+) diff --git a/beetsplug/beatport.py b/beetsplug/beatport.py index eabf5dc31..bede8071d 100644 --- a/beetsplug/beatport.py +++ b/beetsplug/beatport.py @@ -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, diff --git a/beetsplug/deezer.py b/beetsplug/deezer.py index 86c182c39..77f7edc85 100644 --- a/beetsplug/deezer.py +++ b/beetsplug/deezer.py @@ -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,