Compare commits

..

No commits in common. "e03ab77a6714ecd30ae2bf6c1fbaead5366fdcd8" and "92a99ea0e1173cfd5186872ef49c3d67e78f7733" have entirely different histories.

4 changed files with 6 additions and 15 deletions

View File

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

View File

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

View File

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

View File

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