From 1d43ea2dbaa86fe9ead54c028b0298675ecf4c2c Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Sun, 8 May 2022 12:21:44 -0400 Subject: [PATCH 1/7] 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'], From 1b02d65112e3f31f35ea5d578d81d35d2c340b8a Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Sun, 8 May 2022 12:42:20 -0400 Subject: [PATCH 2/7] Fix return --- beetsplug/spotify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/spotify.py b/beetsplug/spotify.py index 5b554bc5b..eff717a9f 100644 --- a/beetsplug/spotify.py +++ b/beetsplug/spotify.py @@ -244,7 +244,7 @@ class SpotifyPlugin(MetadataSourcePlugin, BeetsPlugin): return TrackInfo( title=track_data['name'], track_id=track_data['id'], - spotify_track_id=track_id, + spotify_track_id=track_data['id'], artist=artist, artist_id=artist_id, spotify_artist_id=artist_id, From c5c34e4cdadc959553e3eae4e1575a3d3607adf9 Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Sun, 8 May 2022 14:02:45 -0400 Subject: [PATCH 3/7] Update changelog --- docs/changelog.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 8c4a0ed5b..02553275f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,10 +7,10 @@ Changelog Changelog goes here! New features: - +* Save Spotify `album_id`, `artist_id` and `track_id` information. Partial fix for `4347`. * Create the parental directories for database if they do not exist. :bug:`3808` :bug:`4327` -* :ref:`musicbrainz-config`: a new :ref:`musicbrainz.enabled` option allows disabling +* :ref:`musicbrainz-config`: a new :ref:`musicbrainz.enabled` option allows disabling the MusicBrainz metadata source during the autotagging process * :doc:`/plugins/kodiupdate`: Now supports multiple kodi instances :bug:`4101` @@ -20,7 +20,7 @@ New features: * :doc:`/plugins/convert`: Add a new `auto_keep` option that automatically converts files but keeps the *originals* in the library. :bug:`1840` :bug:`4302` -* Added a ``-P`` (or ``--disable-plugins``) flag to specify one/multiple plugin(s) to be +* Added a ``-P`` (or ``--disable-plugins``) flag to specify one/multiple plugin(s) to be disabled at startup. Bug fixes: From d8de9162bf59119f9635d3d878dde9a7cd7f0ba7 Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Sun, 8 May 2022 14:11:24 -0400 Subject: [PATCH 4/7] Update changelog.rst --- docs/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 02553275f..c2e35b627 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -7,6 +7,7 @@ Changelog Changelog goes here! New features: + * Save Spotify `album_id`, `artist_id` and `track_id` information. Partial fix for `4347`. * Create the parental directories for database if they do not exist. :bug:`3808` :bug:`4327` From 8881ae62f7882e935c62b67f2a8438d364cd42ff Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Sun, 8 May 2022 14:19:21 -0400 Subject: [PATCH 5/7] Update changelog.rst --- docs/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index c2e35b627..8751ce0cf 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,7 +8,7 @@ Changelog goes here! New features: -* Save Spotify `album_id`, `artist_id` and `track_id` information. Partial fix for `4347`. +* Save Spotify `album_id`, `artist_id`, and `track_id` information * Create the parental directories for database if they do not exist. :bug:`3808` :bug:`4327` * :ref:`musicbrainz-config`: a new :ref:`musicbrainz.enabled` option allows disabling From e62a904f950b9805bd407266e1f4bacc78ff852d Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 8 May 2022 16:03:10 -0400 Subject: [PATCH 6/7] Expand changelog entry --- docs/changelog.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 8751ce0cf..e5cbb66cc 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,7 +8,9 @@ Changelog goes here! New features: -* Save Spotify `album_id`, `artist_id`, and `track_id` information +* :doc:`/pluings/spotify`: The plugin now records Spotify-specific IDs in the + `spotify_album_id`, `spotify_artist_id`, and `spotify_track_id` fields. + :bug:`4348` * Create the parental directories for database if they do not exist. :bug:`3808` :bug:`4327` * :ref:`musicbrainz-config`: a new :ref:`musicbrainz.enabled` option allows disabling From e607763028495badfda68098f18220eb0dada9fe Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 8 May 2022 16:08:20 -0400 Subject: [PATCH 7/7] Fix typo! --- docs/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index e5cbb66cc..72b1cf1fe 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,7 +8,7 @@ Changelog goes here! New features: -* :doc:`/pluings/spotify`: The plugin now records Spotify-specific IDs in the +* :doc:`/plugins/spotify`: The plugin now records Spotify-specific IDs in the `spotify_album_id`, `spotify_artist_id`, and `spotify_track_id` fields. :bug:`4348` * Create the parental directories for database if they do not exist.