Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save Spotify album_id and track_id as flexible attributes #4348

Merged
merged 7 commits into from
May 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions beetsplug/spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@ def album_for_id(self, album_id):
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
Expand All @@ -242,8 +244,10 @@ def _get_track(self, track_data):
return TrackInfo(
title=track_data['name'],
track_id=track_data['id'],
spotify_track_id=track_data['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'],
Expand Down
7 changes: 5 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ Changelog goes here!

New features:

* :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.
: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`
Expand All @@ -20,7 +23,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:
Expand Down