增加direct是否写入nfo文件配置
This commit is contained in:
@@ -151,3 +151,6 @@ multi_part_fanart = 0
|
||||
|
||||
[actor_photo]
|
||||
download_for_kodi = 0
|
||||
|
||||
[direct]
|
||||
switch = 1
|
||||
|
||||
@@ -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")
|
||||
|
||||
5
core.py
5
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>" + outline + "</outline>", file=code)
|
||||
print(" <plot>" + outline + "</plot>", file=code)
|
||||
print(" <runtime>" + str(runtime).replace(" ", "") + "</runtime>", file=code)
|
||||
|
||||
if False != conf.get_direct():
|
||||
print(" <director>" + director + "</director>", file=code)
|
||||
|
||||
print(" <poster>" + poster_path + "</poster>", file=code)
|
||||
print(" <thumb>" + thumb_path + "</thumb>", file=code)
|
||||
if not config.getInstance().jellyfin(): # jellyfin 不需要保存fanart
|
||||
|
||||
Reference in New Issue
Block a user