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
bdf60523
Unverified
Commit
bdf60523
authored
Sep 03, 2020
by
norangebit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conversion to kepub when creating a sync token
parent
99d653ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
kobo_auth.py
cps/kobo_auth.py
+10
-2
No files found.
cps/kobo_auth.py
View file @
bdf60523
...
...
@@ -64,10 +64,10 @@ from datetime import datetime
from
os
import
urandom
from
flask
import
g
,
Blueprint
,
url_for
,
abort
,
request
from
flask_login
import
login_user
,
login_required
from
flask_login
import
current_user
,
login_user
,
login_required
from
flask_babel
import
gettext
as
_
from
.
import
logger
,
ub
,
lm
from
.
import
logger
,
config
,
calibre_db
,
db
,
helper
,
ub
,
lm
from
.web
import
render_title_template
try
:
...
...
@@ -148,6 +148,14 @@ def generate_auth_token(user_id):
ub
.
session
.
add
(
auth_token
)
ub
.
session
.
commit
()
books
=
calibre_db
.
session
.
query
(
db
.
Books
)
.
join
(
db
.
Data
)
.
all
()
for
book
in
books
:
formats
=
[
data
.
format
for
data
in
book
.
data
]
if
not
'KEPUB'
in
formats
and
config
.
config_kepubifypath
and
'EPUB'
in
formats
:
helper
.
convert_book_format
(
book
.
id
,
config
.
config_calibre_dir
,
'EPUB'
,
'KEPUB'
,
current_user
.
nickname
)
return
render_title_template
(
"generate_kobo_auth_url.html"
,
title
=
_
(
u"Kobo Setup"
),
...
...
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