Compare commits
No commits in common. "e03ab77a6714ecd30ae2bf6c1fbaead5366fdcd8" and "92a99ea0e1173cfd5186872ef49c3d67e78f7733" have entirely different histories.
e03ab77a67
...
92a99ea0e1
@ -5,7 +5,6 @@ user = user
|
||||
pass = pass
|
||||
db_name = gamedistrosys
|
||||
contentpath = /srv/nfs_mounts/media/PC/
|
||||
nfo_suffix = _index.nfo
|
||||
|
||||
[Running]
|
||||
host = 172.29.29.51
|
||||
|
||||
@ -32,6 +32,3 @@ def init():
|
||||
|
||||
def contentpath():
|
||||
return(config.get('Database','contentpath'))
|
||||
|
||||
def nfosuffix():
|
||||
return(config.get('Database','nfo_suffix'))
|
||||
|
||||
@ -26,16 +26,12 @@ 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(
|
||||
if skip_artwork is False:
|
||||
nfo['game']['artwork'][i]['data'] = reduceartcv2(
|
||||
artpath+art['filename'], 'thumbnail')
|
||||
except Exception as e:
|
||||
print("Failing cover: " + art['filename'])
|
||||
print(e)
|
||||
if art['type'] == 'front':
|
||||
nfo['game']['displayimage'] = reduceartcv2(
|
||||
artpath+art['filename'], 'thumbnail')
|
||||
i += 1
|
||||
if 'displayimage' not in nfo['game']:
|
||||
for art in nfo['game']['artwork']:
|
||||
|
||||
@ -6,7 +6,6 @@ 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
|
||||
@ -23,7 +22,7 @@ def show_gamelist():
|
||||
@app.route('/gamelist/update', methods=['GET'])
|
||||
def update_gamelist():
|
||||
nfolist = list(dict.fromkeys(glob.glob(
|
||||
str(contentpath)+'/**/**/*'+nfosuffix, recursive=True)))
|
||||
str(contentpath)+'/**/**/*_index.nfo', recursive=True)))
|
||||
|
||||
glist = []
|
||||
for nfo in nfolist:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user