From b96ee917eb88275ac34f296013a5e00478c69679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Niem=C3=B6ller?= Date: Wed, 26 Oct 2022 17:52:19 +0200 Subject: [PATCH] Config and exception handling --- api/api.conf | 5 +++-- api/modules/gamelist.py | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/api/api.conf b/api/api.conf index 63943bf..831d628 100644 --- a/api/api.conf +++ b/api/api.conf @@ -1,11 +1,12 @@ [Database] db_type = MySQL -host = 172.29.29.15 +host = localhost user = user pass = pass db_name = gamedistrosys +contentpath = /srv/nfs_mounts/media/PC/ [Running] -host = localhost +host = 172.29.29.51 port = 5501 diff --git a/api/modules/gamelist.py b/api/modules/gamelist.py index f6065d0..b69fd13 100644 --- a/api/modules/gamelist.py +++ b/api/modules/gamelist.py @@ -16,9 +16,10 @@ def gamelist(): gamelist = [] for nfo in nfolist: - # f = open(nfo, encoding="UTF-8") - game = modules.game.game(nfo, True, True) - # game['game']['path'] = base64.b64encode(nfo.encode('utf-8')).decode() - gamelist.append(game) + try: + game = modules.game.game(nfo, True, True) + gamelist.append(game) + except Exception as e: + print(e) return jsonify(gamelist)