Merge pull request 'Added printing of failed cover art' (#19) from print-current-art-when-failing into master
Reviewed-on: #19
This commit is contained in:
commit
e03ab77a67
@ -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
|
||||
|
||||
@ -32,3 +32,6 @@ def init():
|
||||
|
||||
def contentpath():
|
||||
return(config.get('Database','contentpath'))
|
||||
|
||||
def nfosuffix():
|
||||
return(config.get('Database','nfo_suffix'))
|
||||
|
||||
@ -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']:
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user