From b3b5278f94d9906ddb1d611d2d6ed497e65324c0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 6 Jun 2013 12:08:10 +0000 Subject: [PATCH] timeline, frame are optional --- scripts/poster.0xdb.py | 4 ++-- scripts/poster.indiancinema.py | 4 ++-- scripts/poster.padma.py | 4 ++-- scripts/poster.pandora.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/poster.0xdb.py b/scripts/poster.0xdb.py index f5f89df1..71feb637 100755 --- a/scripts/poster.0xdb.py +++ b/scripts/poster.0xdb.py @@ -29,8 +29,8 @@ def render_poster(data, poster): series = data.get('isSeries', False) oxdb_id = data['oxdbId'] imdb_id = data['id'] - frame = data['frame'] - timeline = data['timeline'] + frame = data.get('frame') + timeline = data.get('timeline') def get_oxdb_color(oxdb_id, series=False): i = int(round((int(oxdb_id[2:10], 16) * 762 / pow(2, 32)))) diff --git a/scripts/poster.indiancinema.py b/scripts/poster.indiancinema.py index 9c0535c8..6923685e 100755 --- a/scripts/poster.indiancinema.py +++ b/scripts/poster.indiancinema.py @@ -26,8 +26,8 @@ def render_poster(data, poster): director = u', '.join(data.get('director', [])) director = ox.decode_html(director) year = str(data.get('year', '')) - frame = data['frame'] - timeline = data['timeline'] + frame = data.get('frame') + timeline = data.get('timeline') poster_width = 704 poster_height = 1024 diff --git a/scripts/poster.padma.py b/scripts/poster.padma.py index 5c98c170..d271b9c4 100755 --- a/scripts/poster.padma.py +++ b/scripts/poster.padma.py @@ -23,8 +23,8 @@ static_root = os.path.join(os.path.dirname(__file__), 'data') def render_poster(data, poster): title = ox.decode_html(data.get('title', '')) id = data['id'] - frame = data['frame'] - timeline = data['timeline'] + frame = data.get('frame') + timeline = data.get('timeline') poster_width = 640 poster_height = 1024 diff --git a/scripts/poster.pandora.py b/scripts/poster.pandora.py index 49826c49..7d082a4f 100755 --- a/scripts/poster.pandora.py +++ b/scripts/poster.pandora.py @@ -29,8 +29,8 @@ def render_poster(data, poster): series = data.get('isSeries', False) oxdb_id = data['oxdbId'] imdb_id = data['id'] - frame = data['frame'] - timeline = data['timeline'] + frame = data.get('frame') + timeline = data.get('timeline') def get_oxdb_color(oxdb_id, series=False): i = int(round((int(oxdb_id[2:10], 16) * 762 / pow(2, 32))))