download extrafanart and trailer only once
This commit is contained in:
39
core.py
39
core.py
@@ -797,19 +797,21 @@ def core_main(file_path, number_th, conf: config.Config):
|
|||||||
|
|
||||||
# creatFolder会返回番号路径
|
# creatFolder会返回番号路径
|
||||||
image_download( json_data.get('cover'), number, leak_word, c_word, path, conf, filepath)
|
image_download( json_data.get('cover'), number, leak_word, c_word, path, conf, filepath)
|
||||||
try:
|
|
||||||
# 下载预告片
|
|
||||||
if json_data.get('trailer'):
|
|
||||||
trailer_download(json_data.get('trailer'), leak_word, c_word, number, path, filepath, conf)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
if not multi_part or part.lower() == '-cd1':
|
||||||
# 下载剧照 data, path, conf: config.Config, filepath
|
try:
|
||||||
if json_data.get('extrafanart'):
|
# 下载预告片
|
||||||
extrafanart_download(json_data.get('extrafanart'), path, conf, filepath)
|
if json_data.get('trailer'):
|
||||||
except:
|
trailer_download(json_data.get('trailer'), leak_word, c_word, number.split('-cd')[0], path, filepath, conf)
|
||||||
pass
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
# 下载剧照 data, path, conf: config.Config, filepath
|
||||||
|
if json_data.get('extrafanart'):
|
||||||
|
extrafanart_download(json_data.get('extrafanart'), path, conf, filepath)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
# 裁剪图
|
# 裁剪图
|
||||||
cutImage(imagecut, path, number, leak_word, c_word)
|
cutImage(imagecut, path, number, leak_word, c_word)
|
||||||
|
|
||||||
@@ -847,13 +849,14 @@ def core_main(file_path, number_th, conf: config.Config):
|
|||||||
# creatFolder会返回番号路径
|
# creatFolder会返回番号路径
|
||||||
image_download(json_data.get('cover'), number, leak_word, c_word, path, conf, filepath)
|
image_download(json_data.get('cover'), number, leak_word, c_word, path, conf, filepath)
|
||||||
|
|
||||||
# 下载预告片
|
if not multi_part or part.lower() == '-cd1':
|
||||||
if json_data.get('trailer'):
|
# 下载预告片
|
||||||
trailer_download(json_data.get('trailer'), leak_word, c_word, number, path, filepath, conf)
|
if json_data.get('trailer'):
|
||||||
|
trailer_download(json_data.get('trailer'), leak_word, c_word, number, path, filepath, conf)
|
||||||
|
|
||||||
# 下载剧照 data, path, conf: config.Config, filepath
|
# 下载剧照 data, path, conf: config.Config, filepath
|
||||||
if json_data.get('extrafanart'):
|
if json_data.get('extrafanart'):
|
||||||
extrafanart_download(json_data.get('extrafanart'), path, conf, filepath)
|
extrafanart_download(json_data.get('extrafanart'), path, conf, filepath)
|
||||||
|
|
||||||
# 裁剪图
|
# 裁剪图
|
||||||
cutImage(imagecut, path, number, leak_word, c_word)
|
cutImage(imagecut, path, number, leak_word, c_word)
|
||||||
|
|||||||
Reference in New Issue
Block a user