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
0297823b
Commit
0297823b
authored
Apr 28, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'codecosmetic/move_var'
parents
d1bce5c2
48787881
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
comic.py
cps/comic.py
+1
-1
constants.py
cps/constants.py
+1
-1
helper.py
cps/helper.py
+2
-2
No files found.
cps/comic.py
View file @
0297823b
...
...
@@ -37,9 +37,9 @@ except ImportError as e:
def
extractCover
(
tmp_file_name
,
original_file_extension
):
cover_data
=
extension
=
None
if
use_comic_meta
:
archive
=
ComicArchive
(
tmp_file_name
)
cover_data
=
None
for
index
,
name
in
enumerate
(
archive
.
getPageNameList
()):
ext
=
os
.
path
.
splitext
(
name
)
if
len
(
ext
)
>
1
:
...
...
cps/constants.py
View file @
0297823b
...
...
@@ -101,8 +101,8 @@ DEFAULT_MAIL_SERVER = "mail.example.org"
DEFAULT_PASSWORD
=
"admin123"
DEFAULT_PORT
=
8083
env_CALIBRE_PORT
=
os
.
environ
.
get
(
"CALIBRE_PORT"
,
DEFAULT_PORT
)
try
:
env_CALIBRE_PORT
=
os
.
environ
.
get
(
"CALIBRE_PORT"
,
DEFAULT_PORT
)
DEFAULT_PORT
=
int
(
env_CALIBRE_PORT
)
except
ValueError
:
print
(
'Environment variable CALIBRE_PORT has invalid value (
%
s), faling back to default (8083)'
%
env_CALIBRE_PORT
)
...
...
cps/helper.py
View file @
0297823b
...
...
@@ -304,8 +304,8 @@ def update_dir_structure_file(book_id, calibrepath, first_author):
new_titledir
=
get_valid_filename
(
localbook
.
title
)
+
" ("
+
str
(
book_id
)
+
")"
if
titledir
!=
new_titledir
:
new_title_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
path
),
new_titledir
)
try
:
new_title_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
path
),
new_titledir
)
if
not
os
.
path
.
exists
(
new_title_path
):
os
.
renames
(
path
,
new_title_path
)
else
:
...
...
@@ -322,8 +322,8 @@ def update_dir_structure_file(book_id, calibrepath, first_author):
return
_
(
"Rename title from: '
%(src)
s' to '
%(dest)
s' failed with error:
%(error)
s"
,
src
=
path
,
dest
=
new_title_path
,
error
=
str
(
ex
))
if
authordir
!=
new_authordir
:
new_author_path
=
os
.
path
.
join
(
calibrepath
,
new_authordir
,
os
.
path
.
basename
(
path
))
try
:
new_author_path
=
os
.
path
.
join
(
calibrepath
,
new_authordir
,
os
.
path
.
basename
(
path
))
os
.
renames
(
path
,
new_author_path
)
localbook
.
path
=
new_authordir
+
'/'
+
localbook
.
path
.
split
(
'/'
)[
1
]
except
OSError
as
ex
:
...
...
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