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
a42ebdc0
Commit
a42ebdc0
authored
May 07, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #897
parent
49ba221e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
helper.py
cps/helper.py
+1
-1
readpdf.html
cps/templates/readpdf.html
+3
-5
No files found.
cps/helper.py
View file @
a42ebdc0
...
...
@@ -177,7 +177,7 @@ def check_send_to_kindle(entry):
# Check if a reader is existing for any of the book formats, if not, return empty list, otherwise return
# list with supported formats
def
check_read_formats
(
entry
):
EXTENSIONS_READER
=
{
'TXT'
,
'PDF'
,
'EPUB'
,
'
ZIP'
,
'CBZ'
,
'TAR'
,
'CBT'
,
'RAR
'
,
'CBR'
}
EXTENSIONS_READER
=
{
'TXT'
,
'PDF'
,
'EPUB'
,
'
CBZ'
,
'CBT
'
,
'CBR'
}
bookformats
=
list
()
if
len
(
entry
.
data
):
for
ele
in
iter
(
entry
.
data
):
...
...
cps/templates/readpdf.html
View file @
a42ebdc0
...
...
@@ -34,20 +34,18 @@ See https://github.com/adobe-type-tools/cmap-resources
<script
src=
"{{ url_for('static', filename='js/libs/compatibility.js') }}"
></script>
<!-- This snippet is used in production (included from viewer.html) -->
<link
rel=
"resource"
type=
"application/l10n"
href=
"{{ url_for('static', filename='locale/locale.properties') }}"
>
<script
src=
"{{ url_for('static', filename='js/libs/pdf.js') }}"
></script>
<script
type=
"text/javascript"
>
window
.
addEventListener
(
'load'
,
function
()
{
PDFViewerApplicationOptions
.
set
(
'sidebarViewOnLoad'
,
0
);
PDFViewerApplicationOptions
.
set
(
'imageResourcesPath'
,
"{{ url_for('static', filename='css/images/') }}"
);
PDFViewerApplicationOptions
.
set
(
'workerSrc'
,
"{{ url_for('static', filename='js/libs/pdf.worker.js') }}"
);
PDFViewerApplicationOptions
.
set
(
'sidebarViewOnLoad'
,
0
);
// PDFViewerApplication.open("{{ url_for('serve_book', book_id=pdffile, book_format='pdf') }}");
PDFViewerApplicationOptions
.
set
(
'defaultUrl'
,
"{{ url_for('serve_book', book_id=pdffile, book_format='pdf') }}"
);
PDFViewerApplication
.
open
(
"{{ url_for('serve_book', book_id=pdffile, book_format='pdf') }}"
);
});
</script>
<link
rel=
"resource"
type=
"application/l10n"
href=
"{{ url_for('static', filename='locale/locale.properties') }}"
>
<script
src=
"{{ url_for('static', filename='js/libs/viewer.js') }}"
></script>
</head>
...
...
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