From d54da5792953c2288c8428548d2684e3445b2d73 Mon Sep 17 00:00:00 2001 From: odecif Date: Mon, 31 Oct 2022 09:38:46 +0100 Subject: [PATCH] Sorting gamelist alphabetically Fixes #13 --- site/modules/gamelist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/modules/gamelist.py b/site/modules/gamelist.py index 4070f56..1c08a1f 100644 --- a/site/modules/gamelist.py +++ b/site/modules/gamelist.py @@ -24,6 +24,9 @@ def gamelist(lang_code): glist = json.loads((requests.get( host_endpoint + '/gamelist').content).decode()) + # Sorting list alphabetically + glist = sorted(glist, key=lambda d: d['game']['title']) + return render_template('gamelist.html', gamelist=glist, **languages[lang_code], lang_code=lang_code) -- 2.47.3