From 1d43ea2dbaa86fe9ead54c028b0298675ecf4c2c Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Sun, 8 May 2022 12:21:44 -0400 Subject: [PATCH] Save Spotify album_id and track_id as flexible attributes --- beetsplug/spotify.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/beetsplug/spotify.py b/beetsplug/spotify.py index 931078d28..5b554bc5b 100644 --- a/beetsplug/spotify.py +++ b/beetsplug/spotify.py @@ -214,8 +214,10 @@ class SpotifyPlugin(MetadataSourcePlugin, BeetsPlugin): return AlbumInfo( album=album_data['name'], album_id=spotify_id, + spotify_album_id=spotify_id, artist=artist, artist_id=artist_id, + spotify_artist_id=artist_id, tracks=tracks, albumtype=album_data['album_type'], va=len(album_data['artists']) == 1 @@ -242,8 +244,10 @@ class SpotifyPlugin(MetadataSourcePlugin, BeetsPlugin): return TrackInfo( title=track_data['name'], track_id=track_data['id'], + spotify_track_id=track_id, artist=artist, artist_id=artist_id, + spotify_artist_id=artist_id, length=track_data['duration_ms'] / 1000, index=track_data['track_number'], medium=track_data['disc_number'],