Fix the output path of Artist Background.
The artist background had been saving to the folder the script was run from. This has now been resolved.
This commit is contained in:
@@ -36,7 +36,7 @@ def get_image(mb_id, ftv_api_key, artist_path):
|
|||||||
art_url = ftv_data['artistbackground'][0]['url']
|
art_url = ftv_data['artistbackground'][0]['url']
|
||||||
response = requests.get(art_url)
|
response = requests.get(art_url)
|
||||||
if (response.status_code == 200):
|
if (response.status_code == 200):
|
||||||
with open('artist.jpg','wb') as f:
|
with open(os.path.join(artist_path, 'artist.jpg'),'wb') as f:
|
||||||
f.write(response.content)
|
f.write(response.content)
|
||||||
elif ('hdmusiclogo' in ftv_data):
|
elif ('hdmusiclogo' in ftv_data):
|
||||||
art_url = ftv_data['hdmusiclogo'][0]['url']
|
art_url = ftv_data['hdmusiclogo'][0]['url']
|
||||||
|
|||||||
Reference in New Issue
Block a user