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
0e1dbb53
Commit
0e1dbb53
authored
Apr 13, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy author names for displaying (#1935)
parent
f07cc8b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
web.py
cps/web.py
+4
-2
No files found.
cps/web.py
View file @
0e1dbb53
...
...
@@ -26,6 +26,7 @@ from datetime import datetime
import
json
import
mimetypes
import
chardet
# dependency of requests
import
copy
from
babel.dates
import
format_date
from
babel
import
Locale
as
LC
...
...
@@ -830,9 +831,10 @@ def author_list():
charlist
=
calibre_db
.
session
.
query
(
func
.
upper
(
func
.
substr
(
db
.
Authors
.
sort
,
1
,
1
))
.
label
(
'char'
))
\
.
join
(
db
.
books_authors_link
)
.
join
(
db
.
Books
)
.
filter
(
calibre_db
.
common_filters
())
\
.
group_by
(
func
.
upper
(
func
.
substr
(
db
.
Authors
.
sort
,
1
,
1
)))
.
all
()
for
entry
in
entries
:
autor_copy
=
copy
.
deepcopy
(
entries
)
for
entry
in
autor_copy
:
entry
.
Authors
.
name
=
entry
.
Authors
.
name
.
replace
(
'|'
,
','
)
return
render_title_template
(
'list.html'
,
entries
=
entries
,
folder
=
'web.books_list'
,
charlist
=
charlist
,
return
render_title_template
(
'list.html'
,
entries
=
autor_copy
,
folder
=
'web.books_list'
,
charlist
=
charlist
,
title
=
u"Authors"
,
page
=
"authorlist"
,
data
=
'author'
,
order
=
order_no
)
else
:
abort
(
404
)
...
...
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