update poster script

This commit is contained in:
Rolux 2015-09-21 17:52:16 +01:00
parent f58f130025
commit f5b47164fd

View file

@ -45,7 +45,13 @@ def get_hue(collection, title):
def render_poster(data, poster):
title = ox.decode_html(data.get('title', '')).upper()
director = ox.decode_html(u', '.join(data.get('director', []))).upper()
for key in [
'director', 'cinematographer', 'editor',
'writer', 'producer', 'featuring'
]:
director = ox.decode_html(u', '.join(data.get(key, []))).upper()
if director:
break
for key, value in {u'\u03a0': 'PI', u'ß': u'SS'}.iteritems():
title = title.replace(key, value)
director = director.replace(key, value)