mirror of
https://github.com/beetbox/beets.git
synced 2025-12-10 02:22:25 +01:00
Only parse Spotify ID when necessary
This commit is contained in:
parent
96fda0df0d
commit
09fc53eaea
1 changed files with 3 additions and 4 deletions
|
|
@ -243,11 +243,10 @@ class SpotifyPlugin(BeetsPlugin):
|
|||
:return: TrackInfo object for track
|
||||
:rtype: beets.autotag.hooks.TrackInfo
|
||||
"""
|
||||
spotify_id = self._get_spotify_id('track', track_id)
|
||||
if spotify_id is None:
|
||||
return None
|
||||
|
||||
if track_data is None:
|
||||
spotify_id = self._get_spotify_id('track', track_id)
|
||||
if spotify_id is None:
|
||||
return None
|
||||
track_data = self._handle_response(
|
||||
requests.get, self.track_url + spotify_id
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue