Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
[Fix] Skip missing Epic game logo art
Browse files Browse the repository at this point in the history
- Program fails when it tries to search for 'art_logo' key that isn't present in some games for download
- Use try and catch to skip and display warning about it
  • Loading branch information
redromnon committed Dec 3, 2022
1 parent 643cbd8 commit eb6efb2
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions func/artwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,18 @@ def addartwork(appname, appid, userid, simplified_gamename):
logging.info("BigPicture Art exists")

#Logo Art
if checkartworkexists(artwork_path, logoart) == False:

if not i['art_logo'] == None:
image_url = i['art_logo']
logging.info("Downloading Logo Art from " + image_url)
wget.download(image_url, out = artwork_path)
os.rename(artwork_path + '/' + image_url.split("/")[-1], artwork_path + '/' + logoart[0])
else:
logging.info("Logo Art exists")
try:
if checkartworkexists(artwork_path, logoart) == False:

if not i['art_logo'] == None:
image_url = i['art_logo']
logging.info("Downloading Logo Art from " + image_url)
wget.download(image_url, out = artwork_path)
os.rename(artwork_path + '/' + image_url.split("/")[-1], artwork_path + '/' + logoart[0])
else:
logging.info("Logo Art exists")
except:
logging.warning("Cannot find Logo Art for this game")
elif "gog" in readscript:

#print("GOG")
Expand Down

1 comment on commit eb6efb2

@redromnon
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix #115

Please sign in to comment.