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