skip tags

This commit is contained in:
Marks
2022-11-07 18:55:32 -08:00
parent e03fcd8c47
commit a86cfc71d7
3 changed files with 24 additions and 16 deletions

View File

@@ -21,6 +21,8 @@ nfo_skip_days=30
ignore_failed_list=0 ignore_failed_list=0
download_only_missing_images=1 download_only_missing_images=1
mapping_table_validity=7 mapping_table_validity=7
; 在jellyfin中tags和genres重复因此可以只保存genres到nfo中
donot_save_tags = 0
sleep=3 sleep=3
[advenced_sleep] [advenced_sleep]

View File

@@ -212,6 +212,9 @@ class Config:
def mapping_table_validity(self) -> int: def mapping_table_validity(self) -> int:
return self.conf.getint("common", "mapping_table_validity") return self.conf.getint("common", "mapping_table_validity")
def donot_save_tags(self) -> int:
return self.conf.getint("common", "donot_save_tags")
def sleep(self) -> int: def sleep(self) -> int:
return self.conf.getint("common", "sleep") return self.conf.getint("common", "sleep")
@@ -431,6 +434,7 @@ class Config:
conf.set(sec1, "ignore_failed_list", 0) conf.set(sec1, "ignore_failed_list", 0)
conf.set(sec1, "download_only_missing_images", 1) conf.set(sec1, "download_only_missing_images", 1)
conf.set(sec1, "mapping_table_validity", 7) conf.set(sec1, "mapping_table_validity", 7)
conf.set(sec1, "donot_save_tags", 0)
sec2 = "advenced_sleep" sec2 = "advenced_sleep"
conf.add_section(sec2) conf.add_section(sec2)

34
core.py
View File

@@ -364,22 +364,24 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f
pass pass
print(" <maker>" + studio + "</maker>", file=code) print(" <maker>" + studio + "</maker>", file=code)
print(" <label>" + label + "</label>", file=code) print(" <label>" + label + "</label>", file=code)
if cn_sub == '1': skip_tags = config.getInstance().donot_save_tags()
print(" <tag>中文字幕</tag>", file=code) if not skip_tags:
if liuchu == '流出': if cn_sub == '1':
print(" <tag>流出</tag>", file=code) print(" <tag>中文字幕</tag>", file=code)
if uncensored == 1: if liuchu == '流出':
print(" <tag>无码</tag>", file=code) print(" <tag>流出</tag>", file=code)
if hack_word != '': if uncensored == 1:
print(" <tag>破解</tag>", file=code) print(" <tag>无码</tag>", file=code)
if _4k == '4k': if hack_word != '':
print(" <tag>4k</tag>", file=code) print(" <tag>破解</tag>", file=code)
try: if _4k == '4k':
for i in tag: print(" <tag>4k</tag>", file=code)
print(" <tag>" + i + "</tag>", file=code) try:
# print(" <tag>" + series + "</tag>", file=code) for i in tag:
except: print(" <tag>" + i + "</tag>", file=code)
pass # print(" <tag>" + series + "</tag>", file=code)
except:
pass
if cn_sub == '1': if cn_sub == '1':
print(" <genre>中文字幕</genre>", file=code) print(" <genre>中文字幕</genre>", file=code)
if liuchu == '流出': if liuchu == '流出':