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
bfd0e87a
Commit
bfd0e87a
authored
Apr 21, 2019
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into Develop
# Conflicts: # cps/helper.py # cps/reverseproxy.py
parents
2de4bfdc
6a7b8c78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
helper.py
cps/helper.py
+4
-6
updater.py
cps/updater.py
+1
-1
No files found.
cps/helper.py
View file @
bfd0e87a
...
...
@@ -165,8 +165,8 @@ def check_send_to_kindle(entry):
bookformats
.
append
({
'format'
:
'Pdf'
,
'convert'
:
0
,
'text'
:
_
(
'Send
%(format)
s to Kindle'
,
format
=
'Pdf'
)})
if
'AZW'
in
ele
.
format
:
bookformats
.
append
({
'format'
:
'Azw'
,
'convert'
:
0
,
'text'
:
_
(
'Send
%(format)
s to Kindle'
,
format
=
'Azw'
)})
if
'AZW3'
in
ele
.
format
:
bookformats
.
append
({
'format'
:
'Azw3'
,
'convert'
:
0
,
'text'
:
_
(
'Send
%(format)
s to Kindle'
,
format
=
'Azw3'
)})
'''
if 'AZW3' in ele.format:
bookformats.append({'format':'Azw3','convert':0,'text':_('Send
%(format)
s to Kindle',format='Azw3')})
'''
else
:
formats
=
list
()
for
ele
in
iter
(
entry
.
data
):
...
...
@@ -175,18 +175,16 @@ def check_send_to_kindle(entry):
bookformats
.
append
({
'format'
:
'Mobi'
,
'convert'
:
0
,
'text'
:
_
(
'Send
%(format)
s to Kindle'
,
format
=
'Mobi'
)})
if
'AZW'
in
formats
:
bookformats
.
append
({
'format'
:
'Azw'
,
'convert'
:
0
,
'text'
:
_
(
'Send
%(format)
s to Kindle'
,
format
=
'Azw'
)})
if
'AZW3'
in
formats
:
bookformats
.
append
({
'format'
:
'Azw3'
,
'convert'
:
0
,
'text'
:
_
(
'Send
%(format)
s to Kindle'
,
format
=
'Azw3'
)})
if
'PDF'
in
formats
:
bookformats
.
append
({
'format'
:
'Pdf'
,
'convert'
:
0
,
'text'
:
_
(
'Send
%(format)
s to Kindle'
,
format
=
'Pdf'
)})
if
config
.
config_ebookconverter
>=
1
:
if
'EPUB'
in
formats
and
not
'MOBI'
in
formats
:
bookformats
.
append
({
'format'
:
'Mobi'
,
'convert'
:
1
,
'text'
:
_
(
'Convert
%(orig)
s to
%(format)
s and send to Kindle'
,
orig
=
'Epub'
,
format
=
'Mobi'
)})
if
config
.
config_ebookconverter
==
2
:
'''
if config.config_ebookconverter == 2:
if 'EPUB' in formats and not 'AZW3' in formats:
bookformats.append({'format': 'Azw3','convert':1,
'text'
:
_
(
'Convert
%(orig)
s to
%(format)
s and send to Kindle'
,
orig
=
'Epub'
,
format
=
'Azw3'
)})
'text':_('Convert
%(orig)
s to
%(format)
s and send to Kindle',orig='Epub',format='Azw3')})
'''
return
bookformats
else
:
app
.
logger
.
error
(
u'Cannot find book entry
%
d'
,
entry
.
id
)
...
...
cps/updater.py
View file @
bfd0e87a
...
...
@@ -243,7 +243,7 @@ class Updater(threading.Thread):
@
classmethod
def
_stable_version_info
(
self
):
return
{
'version'
:
'0.6.
2
'
}
# Current version
return
{
'version'
:
'0.6.
3 Beta
'
}
# Current version
def
_nightly_available_updates
(
self
,
request_method
):
tz
=
datetime
.
timedelta
(
seconds
=
time
.
timezone
if
(
time
.
localtime
()
.
tm_isdst
==
0
)
else
time
.
altzone
)
...
...
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