From 59da950a20212f40636b0d1015207c832a32b698 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 18 Oct 2023 16:23:29 +0100 Subject: [PATCH] poster --- scripts/poster.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/poster.py b/scripts/poster.py index 1eda05c..8151ea8 100755 --- a/scripts/poster.py +++ b/scripts/poster.py @@ -28,13 +28,18 @@ def render_poster(data, poster): def get_oxdb_color(oxdb_id, series=False): i = int(round((int(oxdb_id[2:10], 16) * 762 / pow(2, 32)))) - if data.get('type') == ["Original"]: + type = data.get('type') + if type: + type = data.get('type')[0].lower() + if type == "original": i = 0 - elif data.get('type') == ["Background"]: + elif type == "background": i = 200 - elif data.get('type') == ["Foreground"]: + elif type == "foreground": i = 400 - elif data.get('type') == ["Annimation"]: + elif type == "foreground2": + i = 500 + elif type == "annimation": i = 600 if i < 127: