Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
280efad9
Commit
280efad9
authored
Jul 12, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#2052 (wrong series index shown for series_index >=100)
parent
15ec6bec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
jinjia.py
cps/jinjia.py
+1
-1
web.py
cps/web.py
+1
-1
No files found.
cps/jinjia.py
View file @
280efad9
...
@@ -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'
)
...
...
cps/web.py
View file @
280efad9
...
@@ -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:.2
g}'
.
format
(
book
.
series_index
)
title
=
title
+
" #"
+
'{0:.2
f}'
.
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment