diff --git a/pandora/item/views.py b/pandora/item/views.py index fff30e229..0c1a14547 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -1221,16 +1221,40 @@ def item(request, id): keys = [ 'year', 'director', + 'writer', + 'producer', + 'cinematographer', + 'editor', + 'actor', 'topic', - 'summary' ] + if not settings.USE_IMDB: + keys += [ + 'summary' + ] + keys += [ + 'duration' + 'aspectratio' + 'hue', + 'saturation', + 'lightness', + 'volume', + 'numberofcuts', + ] + data = [] - for key in keys: - value = item.get(key) + for id in keys: + value = item.get(id) + key = utils.get_by_id(settings.CONFIG['itemKeys'], id) if value: + title = key['title'] if key else id.capitalize() if isinstance(value, list): value = value = u', '.join([unicode(v) for v in value]) - data.append({'key': key.capitalize(), 'value': value}) + elif key and key.get('type') == 'float': + value = '%0.3f' % value + elif key and key.get('type') == 'time': + value = ox.format_duration(value * 1000) + data.append({'key': id, 'title': title, 'value': value}) clips = [] clip = {'in': 0, 'annotations': []} #logged in users should have javascript. not adding annotations makes load faster diff --git a/pandora/templates/item.html b/pandora/templates/item.html index d2cb23dad..c101b2fab 100644 --- a/pandora/templates/item.html +++ b/pandora/templates/item.html @@ -37,7 +37,7 @@
{{title}}
{% for i in data %}
- {{i.key}}: {{i.value|safe}} + {{i.title}}: {{i.value|safe}}
{% endfor %} {% for c in clips %}