mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
...
This commit is contained in:
parent
622e3adca6
commit
c7f16d75f9
2 changed files with 2 additions and 5 deletions
|
|
@ -631,7 +631,7 @@ def format_field_extended(self, key, series_with_index=True):
|
|||
res = format_date(res, fmeta['display'].get('date_format','dd MMM yyyy'))
|
||||
elif datatype == 'rating':
|
||||
res = res/2.0
|
||||
elif key in ('book_size', 'size'):
|
||||
elif key == 'size':
|
||||
res = human_readable(res)
|
||||
return (name, unicode(res), orig_res, fmeta)
|
||||
|
||||
|
|
|
|||
|
|
@ -121,10 +121,7 @@ def render_data(mi, use_roman_numbers=True, all_fields=False):
|
|||
continue
|
||||
val = prepare_string_for_xml(val)
|
||||
if metadata['datatype'] == 'series':
|
||||
if metadata['is_custom']:
|
||||
sidx = mi.get_extra(field)
|
||||
else:
|
||||
sidx = getattr(mi, field+'_index')
|
||||
sidx = getattr(mi, field+'_index')
|
||||
if sidx is None:
|
||||
sidx = 1.0
|
||||
val = _('Book %s of <span class="series_name">%s</span>')%(fmt_sidx(sidx,
|
||||
|
|
|
|||
Loading…
Reference in a new issue