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
7a14101d
Commit
7a14101d
authored
Mar 07, 2017
by
林檎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into travis
# Conflicts: # cps/helper.py # cps/web.py
parents
07ad73ca
789a1af6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15458 additions
and
23165 deletions
+15458
-23165
messages.mo
cps/translations/pl/LC_MESSAGES/messages.mo
+0
-0
messages.po
cps/translations/pl/LC_MESSAGES/messages.po
+15456
-23163
web.py
cps/web.py
+2
-2
No files found.
cps/translations/pl/LC_MESSAGES/messages.mo
View file @
7a14101d
No preview for this file type
cps/translations/pl/LC_MESSAGES/messages.po
View file @
7a14101d
This diff is collapsed.
Click to expand it.
cps/web.py
View file @
7a14101d
...
...
@@ -685,7 +685,7 @@ def get_opds_download_link(book_id, format):
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
))
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename
=
\"
%
s.
%
s
\"
"
%
(
quote
(
file_name
.
encode
(
'utf8'
)),
format
)
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename
*=UTF-8''
%
s.
%
s"
%
(
urllib
.
quote
(
file_name
.
encode
(
'utf8'
)),
format
)
return
response
...
...
@@ -1295,7 +1295,7 @@ def get_download_link(book_id, format):
response
.
headers
[
"Content-Type"
]
=
mimetypes
.
types_map
[
'.'
+
format
]
except
Exception
as
e
:
pass
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename
=
\"
%
s.
%
s
\"
"
%
(
quote
(
file_name
.
encode
(
'utf-8'
)),
format
)
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename
*=UTF-8''
%
s.
%
s"
%
(
urllib
.
quote
(
file_name
.
encode
(
'utf-8'
)),
format
)
return
response
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