mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
Add additional checks to prevent Spotify calls
This commit is contained in:
parent
4349c1e489
commit
45f4ce6f9a
1 changed files with 3 additions and 0 deletions
|
|
@ -901,6 +901,9 @@ class Spotify(RemoteArtSource):
|
||||||
SPOTIFY_ALBUM_URL = 'https://open.spotify.com/album/'
|
SPOTIFY_ALBUM_URL = 'https://open.spotify.com/album/'
|
||||||
|
|
||||||
def get(self, album, plugin, paths):
|
def get(self, album, plugin, paths):
|
||||||
|
if not len(album.mb_albumid) == 22:
|
||||||
|
self._log.debug("Invalid Spotify album_id: {}", album.mb_albumid)
|
||||||
|
return
|
||||||
url = self.SPOTIFY_ALBUM_URL + album.mb_albumid
|
url = self.SPOTIFY_ALBUM_URL + album.mb_albumid
|
||||||
try:
|
try:
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue