0xDB poster script: handle PI

This commit is contained in:
rolux 2013-07-21 10:42:19 +00:00
parent 90eb669d2d
commit e8e81af594

View file

@ -35,9 +35,11 @@ def get_frame(id, height, position):
def render_poster(data, poster): def render_poster(data, poster):
sz = 'ß'.decode('UTF-8') title = ox.decode_html(data.get('title', '')).upper()
title = ox.decode_html(data.get('title', '')).upper().replace(sz, 'SS') director = ox.decode_html(u', '.join(data.get('director', []))).upper()
director = ox.decode_html(u', '.join(data.get('director', []))).upper().replace(sz, 'SS') for key, value in {'π': 'PI', 'ß': 'SS'}.iteritems():
title = title.replace(key, value)
director = director.replace(key, value)
year = str(data.get('year', '')) year = str(data.get('year', ''))
duration = data.get('duration') duration = data.get('duration')
oxdb_id = data['oxdbId'] oxdb_id = data['oxdbId']