mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-30 21:40:00 +00:00
#2052 (wrong series index shown for series_index >=100)
This commit is contained in:
parent
15ec6bec95
commit
280efad939
@ -114,7 +114,7 @@ def yesno(value, yes, no):
|
||||
@jinjia.app_template_filter('formatfloat')
|
||||
def formatfloat(value, decimals=1):
|
||||
value = 0 if not value else value
|
||||
return ('{0:.' + str(decimals) + 'g}').format(value)
|
||||
return ('{0:.' + str(decimals) + 'f}').format(value).rstrip('0').rstrip('.')
|
||||
|
||||
|
||||
@jinjia.app_template_filter('formatseriesindex')
|
||||
|
@ -1704,7 +1704,7 @@ def read_book(book_id, book_format):
|
||||
if len(book.series):
|
||||
title = title + " - " + book.series[0].name
|
||||
if book.series_index:
|
||||
title = title + " #" + '{0:.2g}'.format(book.series_index)
|
||||
title = title + " #" + '{0:.2f}'.format(book.series_index).rstrip('0').rstrip('.')
|
||||
log.debug(u"Start comic reader for %d", book_id)
|
||||
return render_title_template('readcbr.html', comicfile=all_name, title=title,
|
||||
extension=fileExt)
|
||||
|
Loading…
Reference in New Issue
Block a user