From fbc741521d990ab86a5bc2d9410ceabf26df2a12 Mon Sep 17 00:00:00 2001 From: todoXu Date: Sat, 2 Sep 2023 03:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0direct=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=86=99=E5=85=A5nfo=E6=96=87=E4=BB=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.ini | 3 +++ config.py | 3 +++ core.py | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/config.ini b/config.ini index 9168c19..207e19d 100755 --- a/config.ini +++ b/config.ini @@ -151,3 +151,6 @@ multi_part_fanart = 0 [actor_photo] download_for_kodi = 0 + +[direct] +switch = 1 diff --git a/config.py b/config.py index e008de1..704bc47 100644 --- a/config.py +++ b/config.py @@ -373,6 +373,9 @@ class Config: def debug(self) -> bool: return self.conf.getboolean("debug_mode", "switch") + def get_direct(self) -> bool: + return self.conf.getboolean("direct", "switch") + def is_storyline(self) -> bool: try: return self.conf.getboolean("storyline", "switch") diff --git a/core.py b/core.py index 5f811f9..b643d16 100644 --- a/core.py +++ b/core.py @@ -314,6 +314,8 @@ def image_download(cover, fanart_path, thumb_path, path, filepath, json_headers= def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, filepath, tag, actor_list, liuchu, uncensored, hack, hack_word, _4k, fanart_path, poster_path, thumb_path, iso): + + conf = config.getInstance() title, studio, year, outline, runtime, director, actor_photo, release, number, cover, trailer, website, series, label = get_info( json_data) if config.getInstance().main_mode() == 3: # 模式3下,由于视频文件不做任何改变,.nfo文件必须和视频文件名称除后缀外完全一致,KODI等软件方可支持 @@ -369,7 +371,10 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f print(" " + outline + "", file=code) print(" " + outline + "", file=code) print(" " + str(runtime).replace(" ", "") + "", file=code) - print(" " + director + "", file=code) + + if False != conf.get_direct(): + print(" " + director + "", file=code) + print(" " + poster_path + "", file=code) print(" " + thumb_path + "", file=code) if not config.getInstance().jellyfin(): # jellyfin 不需要保存fanart