Added printing of failed cover art #19

Merged
odecif merged 1 commits from print-current-art-when-failing into master 2022-10-31 11:50:01 +01:00
4 changed files with 15 additions and 6 deletions
Showing only changes of commit edfb0d2162 - Show all commits

View File

@ -5,6 +5,7 @@ user = user
pass = pass
db_name = gamedistrosys
contentpath = /srv/nfs_mounts/media/PC/
nfo_suffix = _index.nfo
[Running]
host = 172.29.29.51

View File

@ -32,3 +32,6 @@ def init():
def contentpath():
return(config.get('Database','contentpath'))
def nfosuffix():
return(config.get('Database','nfo_suffix'))

View File

@ -26,12 +26,16 @@ def game(predefinednfo=False, return_dict=False, skip_artwork=False):
if 'artwork' in nfo['game']:
if nfo['game']['artwork']:
for art in nfo['game']['artwork']:
try:
if skip_artwork is False:
nfo['game']['artwork'][i]['data'] = reduceartcv2(
artpath+art['filename'], 'thumbnail')
if art['type'] == 'front':
nfo['game']['displayimage'] = reduceartcv2(
artpath+art['filename'], 'thumbnail')
except Exception as e:
print("Failing cover: " + art['filename'])
print(e)
i += 1
if 'displayimage' not in nfo['game']:
for art in nfo['game']['artwork']:

View File

@ -6,6 +6,7 @@ import modules.game
import glob
contentpath = modules.db_connect.contentpath()
nfosuffix = modules.db_connect.nfosuffix()
# Collects all _index.nfo-files present and crunches them into a list of
@ -22,7 +23,7 @@ def show_gamelist():
@app.route('/gamelist/update', methods=['GET'])
def update_gamelist():
nfolist = list(dict.fromkeys(glob.glob(
str(contentpath)+'/**/**/*_index.nfo', recursive=True)))
str(contentpath)+'/**/**/*'+nfosuffix, recursive=True)))
glist = []
for nfo in nfolist: