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
dc5191f8
Commit
dc5191f8
authored
Aug 27, 2020
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added unrar binary is found on windows
parent
d7972689
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
comic.py
cps/comic.py
+7
-7
No files found.
cps/comic.py
View file @
dc5191f8
...
...
@@ -74,10 +74,10 @@ def _cover_processing(tmp_file_name, img, extension):
def
_extractCover
(
tmp_file_name
,
original_file_extension
,
rarEx
ce
utable
):
def
_extractCover
(
tmp_file_name
,
original_file_extension
,
rarEx
ec
utable
):
cover_data
=
extension
=
None
if
use_comic_meta
:
archive
=
ComicArchive
(
tmp_file_name
)
archive
=
ComicArchive
(
tmp_file_name
,
rar_exe_path
=
rarExecutable
)
for
index
,
name
in
enumerate
(
archive
.
getPageNameList
()):
ext
=
os
.
path
.
splitext
(
name
)
if
len
(
ext
)
>
1
:
...
...
@@ -106,7 +106,7 @@ def _extractCover(tmp_file_name, original_file_extension, rarExceutable):
break
elif
original_file_extension
.
upper
()
==
'.CBR'
and
use_rarfile
:
try
:
rarfile
.
UNRAR_TOOL
=
rarEx
ce
utable
rarfile
.
UNRAR_TOOL
=
rarEx
ec
utable
cf
=
rarfile
.
RarFile
(
tmp_file_name
)
for
name
in
cf
.
getnames
():
ext
=
os
.
path
.
splitext
(
name
)
...
...
@@ -120,9 +120,9 @@ def _extractCover(tmp_file_name, original_file_extension, rarExceutable):
return
_cover_processing
(
tmp_file_name
,
cover_data
,
extension
)
def
get_comic_info
(
tmp_file_path
,
original_file_name
,
original_file_extension
,
rarEx
ce
utable
):
def
get_comic_info
(
tmp_file_path
,
original_file_name
,
original_file_extension
,
rarEx
ec
utable
):
if
use_comic_meta
:
archive
=
ComicArchive
(
tmp_file_path
,
rar_exe_path
=
rarEx
ce
utable
)
archive
=
ComicArchive
(
tmp_file_path
,
rar_exe_path
=
rarEx
ec
utable
)
if
archive
.
seemsToBeAComicArchive
():
if
archive
.
hasMetadata
(
MetaDataStyle
.
CIX
):
style
=
MetaDataStyle
.
CIX
...
...
@@ -148,7 +148,7 @@ def get_comic_info(tmp_file_path, original_file_name, original_file_extension, r
extension
=
original_file_extension
,
title
=
loadedMetadata
.
title
or
original_file_name
,
author
=
" & "
.
join
([
credit
[
"person"
]
for
credit
in
loadedMetadata
.
credits
if
credit
[
"role"
]
==
"Writer"
])
or
u'Unknown'
,
cover
=
_extractCover
(
tmp_file_path
,
original_file_extension
,
rarEx
ce
utable
),
cover
=
_extractCover
(
tmp_file_path
,
original_file_extension
,
rarEx
ec
utable
),
description
=
loadedMetadata
.
comments
or
""
,
tags
=
""
,
series
=
loadedMetadata
.
series
or
""
,
...
...
@@ -160,7 +160,7 @@ def get_comic_info(tmp_file_path, original_file_name, original_file_extension, r
extension
=
original_file_extension
,
title
=
original_file_name
,
author
=
u'Unknown'
,
cover
=
_extractCover
(
tmp_file_path
,
original_file_extension
,
rarEx
ce
utable
),
cover
=
_extractCover
(
tmp_file_path
,
original_file_extension
,
rarEx
ec
utable
),
description
=
""
,
tags
=
""
,
series
=
""
,
...
...
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