Divide ratings by 2 when used in a template.

This commit is contained in:
Charles Haley 2011-04-19 08:59:53 +01:00
parent b9d90ec8e1
commit 5312b49d85
2 changed files with 2 additions and 1 deletions

View File

@ -625,6 +625,8 @@ class Metadata(object):
res = res + ' [%s]'%self.format_series_index()
elif datatype == 'datetime':
res = format_date(res, fmeta['display'].get('date_format','dd MMM yyyy'))
elif datatype == 'rating':
res = res/2
return (name, unicode(res), orig_res, fmeta)
return (None, None, None, None)

View File

@ -198,7 +198,6 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250,
for key in custom_metadata:
if key in format_args:
cm = custom_metadata[key]
## TODO: NEWMETA: should ratings be divided by 2? The standard rating isn't...
if cm['datatype'] == 'series':
format_args[key] = title_sort(format_args[key], order=tsorder)
if key+'_index' in format_args: