Add: Tag only have actors in config
This commit is contained in:
@@ -23,6 +23,8 @@ download_only_missing_images=1
|
|||||||
mapping_table_validity = 7
|
mapping_table_validity = 7
|
||||||
; 在jellyfin中tags和genres重复,因此可以只保存genres到nfo中
|
; 在jellyfin中tags和genres重复,因此可以只保存genres到nfo中
|
||||||
donot_save_tags = 0
|
donot_save_tags = 0
|
||||||
|
; 开启后tag和genere只显示演员
|
||||||
|
actor_only_tag = 0
|
||||||
sleep = 3
|
sleep = 3
|
||||||
|
|
||||||
[advenced_sleep]
|
[advenced_sleep]
|
||||||
|
|||||||
@@ -216,6 +216,9 @@ class Config:
|
|||||||
def donot_save_tags(self) -> int:
|
def donot_save_tags(self) -> int:
|
||||||
return self.conf.getint("common", "donot_save_tags")
|
return self.conf.getint("common", "donot_save_tags")
|
||||||
|
|
||||||
|
def actor_only_tag(self) -> bool:
|
||||||
|
return self.conf.getboolean("common", "actor_only_tag")
|
||||||
|
|
||||||
def sleep(self) -> int:
|
def sleep(self) -> int:
|
||||||
return self.conf.getint("common", "sleep")
|
return self.conf.getint("common", "sleep")
|
||||||
|
|
||||||
|
|||||||
8
core.py
8
core.py
@@ -374,6 +374,13 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f
|
|||||||
|
|
||||||
skip_tags = config.getInstance().donot_save_tags()
|
skip_tags = config.getInstance().donot_save_tags()
|
||||||
if not skip_tags:
|
if not skip_tags:
|
||||||
|
if config.getInstance().actor_only_tag():
|
||||||
|
for key in actor_list:
|
||||||
|
try:
|
||||||
|
print(" <tag>" + key + "</tag>", file=code)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
if cn_sub == '1':
|
if cn_sub == '1':
|
||||||
print(" <tag>中文字幕</tag>", file=code)
|
print(" <tag>中文字幕</tag>", file=code)
|
||||||
if liuchu == '流出':
|
if liuchu == '流出':
|
||||||
@@ -384,7 +391,6 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f
|
|||||||
print(" <tag>破解</tag>", file=code)
|
print(" <tag>破解</tag>", file=code)
|
||||||
if _4k == '4k':
|
if _4k == '4k':
|
||||||
print(" <tag>4k</tag>", file=code)
|
print(" <tag>4k</tag>", file=code)
|
||||||
try:
|
|
||||||
for i in tag:
|
for i in tag:
|
||||||
print(" <tag>" + i + "</tag>", file=code)
|
print(" <tag>" + i + "</tag>", file=code)
|
||||||
# print(" <tag>" + series + "</tag>", file=code)
|
# print(" <tag>" + series + "</tag>", file=code)
|
||||||
|
|||||||
Reference in New Issue
Block a user