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
a87fab87
Commit
a87fab87
authored
Mar 14, 2017
by
OzzieIsaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Smaller cover picturees on small devices
- filename for download with underscore
parent
59bf568f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
detail.html
cps/templates/detail.html
+1
-1
web.py
cps/web.py
+2
-2
No files found.
cps/templates/detail.html
View file @
a87fab87
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
{% block body %}
{% block body %}
<div
class=
"single"
>
<div
class=
"single"
>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-sm-3 col-lg-3 col-xs-
12
"
>
<div
class=
"col-sm-3 col-lg-3 col-xs-
5
"
>
<div
class=
"cover"
>
<div
class=
"cover"
>
{% if entry.has_cover %}
{% if entry.has_cover %}
<img
src=
"{{ url_for('get_cover', cover_path=entry.path.replace('\\','/')) }}"
/>
<img
src=
"{{ url_for('get_cover', cover_path=entry.path.replace('\\','/')) }}"
/>
...
...
cps/web.py
View file @
a87fab87
...
@@ -700,7 +700,7 @@ def get_opds_download_link(book_id, format):
...
@@ -700,7 +700,7 @@ def get_opds_download_link(book_id, format):
helper
.
update_download
(
book_id
,
int
(
current_user
.
id
))
helper
.
update_download
(
book_id
,
int
(
current_user
.
id
))
file_name
=
book
.
title
file_name
=
book
.
title
if
len
(
book
.
authors
)
>
0
:
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
)
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
=
make_response
(
send_from_directory
(
os
.
path
.
join
(
config
.
config_calibre_dir
,
book
.
path
),
data
.
name
+
"."
+
format
))
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename*=UTF-8''
%
s.
%
s"
%
(
quote
(
file_name
.
encode
(
'utf8'
)),
format
)
response
.
headers
[
"Content-Disposition"
]
=
"attachment; filename*=UTF-8''
%
s.
%
s"
%
(
quote
(
file_name
.
encode
(
'utf8'
)),
format
)
...
@@ -1324,7 +1324,7 @@ def get_download_link(book_id, format):
...
@@ -1324,7 +1324,7 @@ def get_download_link(book_id, format):
helper
.
update_download
(
book_id
,
int
(
current_user
.
id
))
helper
.
update_download
(
book_id
,
int
(
current_user
.
id
))
file_name
=
book
.
title
file_name
=
book
.
title
if
len
(
book
.
authors
)
>
0
:
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
)
file_name
=
helper
.
get_valid_filename
(
file_name
)
response
=
make_response
(
response
=
make_response
(
send_from_directory
(
os
.
path
.
join
(
config
.
config_calibre_dir
,
book
.
path
),
data
.
name
+
"."
+
format
))
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