Updated readme.md (get it because thats always the first commit message)

i also made an api key mandatory to ping the last fm server at all, so it wont try with an empty key
This commit is contained in:
Dylan Fournier 2024-09-10 19:43:13 -04:00
parent 2b293c76d1
commit f567a3e093
2 changed files with 7 additions and 2 deletions

View file

@ -53,7 +53,7 @@ for i in songFiles:
except:
title = i
artist = None
if args.art.lower() == "true":
if args.art.lower() == "true" and not(args.apikey == ""):
try:
image = ast.literal_eval(requests.post(url="http://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key="+apikeylastfm+"&artist="+artist+"&track="+title+"&format=json").text)["track"]["album"]["image"][1]["#text"]
if image == "":