修复-CD1 -CD2及imagecut==3下载小封面后因水印文件不存在而失败的问题
This commit is contained in:
15
core.py
15
core.py
@@ -70,10 +70,12 @@ def get_info(json_data): # 返回json里的数据
|
|||||||
return title, studio, year, outline, runtime, director, actor_photo, release, number, cover, trailer, website, series, label
|
return title, studio, year, outline, runtime, director, actor_photo, release, number, cover, trailer, website, series, label
|
||||||
|
|
||||||
|
|
||||||
def small_cover_check(path, number, cover_small, leak_word, c_word, hack_word, filepath):
|
def small_cover_check(path, filename, cover_small, movie_path):
|
||||||
filename = f"{number}{leak_word}{c_word}{hack_word}-poster.jpg"
|
full_filepath = os.path.join(path, filename)
|
||||||
download_file_with_filename(cover_small, filename, path, filepath)
|
if config.getInstance().download_only_missing_images() and not file_not_exist_or_empty(full_filepath):
|
||||||
print('[+]Image Downloaded! ' + os.path.join(path, filename))
|
return
|
||||||
|
download_file_with_filename(cover_small, filename, path, movie_path)
|
||||||
|
print('[+]Image Downloaded! ' + full_filepath)
|
||||||
|
|
||||||
|
|
||||||
def create_folder(json_data): # 创建文件夹
|
def create_folder(json_data): # 创建文件夹
|
||||||
@@ -696,8 +698,7 @@ def core_main(file_path, number_th, oCC):
|
|||||||
|
|
||||||
# 检查小封面, 如果image cut为3,则下载小封面
|
# 检查小封面, 如果image cut为3,则下载小封面
|
||||||
if imagecut == 3:
|
if imagecut == 3:
|
||||||
small_cover_check(path, number, json_data.get('cover_small'), leak_word, c_word, hack_word, filepath)
|
small_cover_check(path, poster_path, json_data.get('cover_small'), filepath)
|
||||||
|
|
||||||
|
|
||||||
# creatFolder会返回番号路径
|
# creatFolder会返回番号路径
|
||||||
image_download( cover, fanart_path,thumb_path, path, filepath)
|
image_download( cover, fanart_path,thumb_path, path, filepath)
|
||||||
@@ -746,7 +747,7 @@ def core_main(file_path, number_th, oCC):
|
|||||||
|
|
||||||
# 检查小封面, 如果image cut为3,则下载小封面
|
# 检查小封面, 如果image cut为3,则下载小封面
|
||||||
if imagecut == 3:
|
if imagecut == 3:
|
||||||
small_cover_check(path, number, json_data.get('cover_small'), leak_word, c_word, hack_word, filepath)
|
small_cover_check(path, poster_path, json_data.get('cover_small'), filepath)
|
||||||
|
|
||||||
# creatFolder会返回番号路径
|
# creatFolder会返回番号路径
|
||||||
image_download( cover, fanart_path,thumb_path, path, filepath)
|
image_download( cover, fanart_path,thumb_path, path, filepath)
|
||||||
|
|||||||
Reference in New Issue
Block a user