diff --git a/core.py b/core.py index 07eeb4a..28cca5b 100644 --- a/core.py +++ b/core.py @@ -342,9 +342,14 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f with open(nfo_path, "wt", encoding='UTF-8') as code: print('', file=code) print("", file=code) - print(" <![CDATA[" + naming_rule + "]]>", file=code) - print(" ", file=code) - print(" ", file=code) + if not config.getInstance().jellyfin(): + print(" <![CDATA[" + naming_rule + "]]>", file=code) + print(" ", file=code) + print(" ", file=code) + else: + print(" " + naming_rule + "", file=code) + print(" " + naming_rule + "", file=code) + print(" " + naming_rule + "", file=code) print(" JP-18+", file=code) print(" JP-18+", file=code) try: @@ -353,14 +358,18 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f print(" ", file=code) print(" " + studio + "", file=code) print(" " + year + "", file=code) - print(" ", file=code) - print(" ", file=code) + if not config.getInstance().jellyfin(): + print(" ", file=code) + print(" ", file=code) + else: + print(" " + outline + "", file=code) + print(" " + outline + "", file=code) print(" " + str(runtime).replace(" ", "") + "", file=code) print(" " + director + "", file=code) print(" " + poster_path + "", file=code) - if not config.getInstance().jellyfin(): # jellyfin 不需要保存thunb - print(" " + thumb_path + "", file=code) - print(" " + fanart_path + "", file=code) + print(" " + thumb_path + "", file=code) + if not config.getInstance().jellyfin(): # jellyfin 不需要保存fanart + print(" " + fanart_path + "", file=code) try: for key in actor_list: print(" ", file=code) @@ -1015,4 +1024,4 @@ def core_main(movie_path, number_th, oCC, specified_source=None, specified_url=N # 最后输出.nfo元数据文件,以完成.nfo文件创建作为任务成功标志 print_files(path, leak_word, c_word, json_data.get('naming_rule'), part, cn_sub, json_data, movie_path, tag, json_data.get('actor_list'), liuchu, uncensored, hack_word, fanart_path, poster_path, - thumb_path) + _4k, thumb_path)