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
2c326964
Commit
2c326964
authored
Mar 05, 2017
by
林檎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/slugify-filename-20170305' into travis
parents
35b9e423
9ca88840
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
web.py
cps/web.py
+1
-1
No files found.
cps/web.py
View file @
2c326964
...
...
@@ -1275,7 +1275,7 @@ def get_download_link(book_id, format):
helper
.
update_download
(
book_id
,
int
(
current_user
.
id
))
file_name
=
book
.
title
if
len
(
book
.
authors
)
>
0
:
file_name
=
book
.
authors
[
0
]
.
name
+
'
-
'
+
file_name
file_name
=
book
.
authors
[
0
]
.
name
+
'
_
'
+
file_name
file_name
=
helper
.
get_valid_filename
(
file_name
)
response
=
make_response
(
send_from_directory
(
os
.
path
.
join
(
config
.
config_calibre_dir
,
book
.
path
),
data
.
name
+
"."
+
format
))
...
...
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