Fix #2048 (Display book title in reader)

This commit is contained in:
Ozzie Isaacs
2021-07-11 12:52:46 +02:00
parent 1bf065fd04
commit aae81c3d24
8 changed files with 18 additions and 16 deletions
+1 -4
View File
@@ -113,10 +113,7 @@ def yesno(value, yes, no):
@jinjia.app_template_filter('formatfloat')
def formatfloat(value, decimals=1):
formatedstring = '%d' % value
if (value % 1) != 0:
formatedstring = ('%s.%d' % (formatedstring, (value % 1) * 10**decimals)).rstrip('0')
return formatedstring
return ('{0:.' + str(decimals) + 'g}').format(value)
@jinjia.app_template_filter('formatseriesindex')