mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-24 13:03:02 +02:00
Divide ratings by 2 when used in a template.
This commit is contained in:
parent
b9d90ec8e1
commit
5312b49d85
2 changed files with 2 additions and 1 deletions
|
|
@ -625,6 +625,8 @@ def format_field_extended(self, key, series_with_index=True):
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue