Commit 280efad9 authored by Ozzie Isaacs's avatar Ozzie Isaacs

#2052 (wrong series index shown for series_index >=100)

parent 15ec6bec
...@@ -114,7 +114,7 @@ def yesno(value, yes, no): ...@@ -114,7 +114,7 @@ def yesno(value, yes, no):
@jinjia.app_template_filter('formatfloat') @jinjia.app_template_filter('formatfloat')
def formatfloat(value, decimals=1): def formatfloat(value, decimals=1):
value = 0 if not value else value 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') @jinjia.app_template_filter('formatseriesindex')
......
...@@ -1704,7 +1704,7 @@ def read_book(book_id, book_format): ...@@ -1704,7 +1704,7 @@ def read_book(book_id, book_format):
if len(book.series): if len(book.series):
title = title + " - " + book.series[0].name title = title + " - " + book.series[0].name
if book.series_index: 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) log.debug(u"Start comic reader for %d", book_id)
return render_title_template('readcbr.html', comicfile=all_name, title=title, return render_title_template('readcbr.html', comicfile=all_name, title=title,
extension=fileExt) extension=fileExt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment