From 07af676bd667785dcad8ff786c1a54a9f46c512a Mon Sep 17 00:00:00 2001 From: SharpX2016 Date: Tue, 27 Apr 2021 13:29:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20core.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.处理元数据时无码的会加上 '无码' 标签(tag)及 风格类型(genre) 2.处理元数据时流出的会加上 '流出' 风格类型(genre) 3.处理元数据时加上 '系列'(series) 风格类型(genre) 4.将标签(tag)及 风格类型(genre)顺序对应 --- core.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/core.py b/core.py index b81d649..3c97ed2 100755 --- a/core.py +++ b/core.py @@ -435,7 +435,7 @@ def image_download(cover, number, leak_word, c_word, path, conf: config.Config, shutil.copyfile(path + '/' + number + leak_word + c_word + '-fanart.jpg',path + '/' + number + leak_word + c_word + '-thumb.jpg') -def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, filepath, failed_folder, tag, actor_list, liuchu): +def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, filepath, failed_folder, tag, actor_list, liuchu, uncensored): title, studio, year, outline, runtime, director, actor_photo, release, number, cover, trailer, website, series, label = get_info(json_data) try: @@ -469,19 +469,26 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f print(" 中文字幕", file=code) if liuchu == '流出': print(" 流出", file=code) + if uncensored == 1: + print(" 无码", file=code) try: for i in tag: print(" " + i + "", file=code) print(" " + series + "", file=code) except: aaaaa = '' + if cn_sub == '1': + print(" 中文字幕", file=code) + if liuchu == '流出': + print(" 流出", file=code) + if uncensored == 1: + print(" 无码", file=code) try: for i in tag: print(" " + i + "", file=code) + print(" " + series + "", file=code) except: aaaaaaaa = '' - if cn_sub == '1': - print(" 中文字幕", file=code) print(" " + number + "", file=code) print(" " + release + "", file=code) print(" " + cover + "", file=code) @@ -764,7 +771,7 @@ def core_main(file_path, number_th, conf: config.Config): cutImage(imagecut, path, number, leak_word, c_word) # 打印文件 - print_files(path, leak_word, c_word, json_data.get('naming_rule'), part, cn_sub, json_data, filepath, conf.failed_folder(), tag, json_data.get('actor_list'), liuchu) + print_files(path, leak_word, c_word, json_data.get('naming_rule'), part, cn_sub, json_data, filepath, conf.failed_folder(), tag, json_data.get('actor_list'), liuchu, uncensored) # 移动文件 paste_file_to_folder(filepath, path, number, leak_word, c_word, conf)