mirror of
https://github.com/krateng/maloja.git
synced 2025-04-16 00:40:32 +03:00
Fixed error with Spotify album art fetching
This commit is contained in:
parent
9cbdbfc2ad
commit
cf6f50169c
2
maloja/thirdparty/__init__.py
vendored
2
maloja/thirdparty/__init__.py
vendored
@ -230,7 +230,7 @@ class MetadataInterface(GenericInterface,abstract=True):
|
||||
|
||||
def get_image_album(self,album):
|
||||
artists, title = album
|
||||
artiststring = urllib.parse.quote(", ".join(artists))
|
||||
artiststring = urllib.parse.quote(", ".join(artists or []))
|
||||
titlestring = urllib.parse.quote(title)
|
||||
response = urllib.request.urlopen(
|
||||
self.metadata["albumurl"].format(artist=artiststring,title=titlestring,**self.settings)
|
||||
|
2
maloja/thirdparty/spotify.py
vendored
2
maloja/thirdparty/spotify.py
vendored
@ -15,7 +15,7 @@ class Spotify(MetadataInterface):
|
||||
|
||||
metadata = {
|
||||
"trackurl": "https://api.spotify.com/v1/search?q=artist:{artist}%20track:{title}&type=track&access_token={token}",
|
||||
"albumurl": "https://api.spotify.com/v1/search?q=artist:{artist}%album:{title}&type=album&access_token={token}",
|
||||
"albumurl": "https://api.spotify.com/v1/search?q=artist:{artist}%20album:{title}&type=album&access_token={token}",
|
||||
"artisturl": "https://api.spotify.com/v1/search?q=artist:{artist}&type=artist&access_token={token}",
|
||||
"response_type":"json",
|
||||
"response_parse_tree_track": ["tracks","items",0,"album","images",0,"url"], # use album art
|
||||
|
Loading…
x
Reference in New Issue
Block a user