Skip to content

Commit

Permalink
Add: Tag only have actors in config
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdctop committed Nov 23, 2022
1 parent 9db0ba2 commit d724b93
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 32 deletions.
42 changes: 22 additions & 20 deletions config.ini
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
# 详细教程请看
# - https://github.com/yoshiko2/Movie_Data_Capture/wiki#%E9%85%8D%E7%BD%AEconfigini
[common]
main_mode=1
source_folder=./
failed_output_folder=failed
success_output_folder=JAV_output
link_mode=0
main_mode = 1
source_folder = ./
failed_output_folder = failed
success_output_folder = JAV_output
link_mode = 0
; 0: 不刮削硬链接文件 1: 刮削硬链接文件
scan_hardlink=0
failed_move=0
auto_exit=0
translate_to_sc=0
multi_threading=0
scan_hardlink = 0
failed_move = 0
auto_exit = 0
translate_to_sc = 0
multi_threading = 0
;actor_gender value: female(♀) or male(♂) or both(♀ ♂) or all(♂ ♀ ⚧)
actor_gender=female
del_empty_folder=1
actor_gender = female
del_empty_folder = 1
; 跳过最近(默认:30)天新修改过的.NFO,可避免整理模式(main_mode=3)和软连接(soft_link=0)时
; 反复刮削靠前的视频文件,0为处理所有视频文件
nfo_skip_days=30
ignore_failed_list=0
download_only_missing_images=1
mapping_table_validity=7
nfo_skip_days = 30
ignore_failed_list = 0
download_only_missing_images = 1
mapping_table_validity = 7
; 在jellyfin中tags和genres重复,因此可以只保存genres到nfo中
donot_save_tags = 0
sleep=3
; 开启后tag和genere只显示演员
actor_only_tag = 0
sleep = 3

[advenced_sleep]
; 处理完多少个视频文件后停止,0为处理所有视频文件
Expand Down Expand Up @@ -101,7 +103,7 @@ extrafanart_folder=extrafanart

; 剧情简介
[storyline]
switch=1
switch = 1
; website为javbus javdb avsox xcity carib时,site censored_site uncensored_site 为获取剧情简介信息的
; 可选数据源站点列表。列表内站点同时并发查询,取值优先级由冒号前的序号决定,从小到大,数字小的站点没数据才会采用后面站点获得的。
; 其中airavwiki airav avno1 58avgo是中文剧情简介,区别是airav只能查有码,avno1 airavwiki 有码无码都能查,
Expand All @@ -113,9 +115,9 @@ site = airav,avno1,airavwiki
censored_site = airav,avno1,xcity,amazon
uncensored_site = 58avgo
; 运行模式:0:顺序执行(最慢) 1:线程池(默认值) 2:进程池(启动开销比线程池大,并发站点越多越快)
run_mode=1
run_mode = 1
; show_result剧情简介调试信息 0关闭 1简略 2详细(详细部分不记入日志),剧情简介失效时可打开2查看原因
show_result=0
show_result = 0

; 繁简转换 繁简转换模式mode=0:不转换 1:繁转简 2:简转繁
[cc_convert]
Expand Down
5 changes: 4 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ def download_only_missing_images(self) -> bool:

def mapping_table_validity(self) -> int:
return self.conf.getint("common", "mapping_table_validity")

def donot_save_tags(self) -> int:
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:
return self.conf.getint("common", "sleep")

Expand Down
28 changes: 17 additions & 11 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,17 +374,23 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f

skip_tags = config.getInstance().donot_save_tags()
if not skip_tags:
if cn_sub == '1':
print(" <tag>中文字幕</tag>", file=code)
if liuchu == '流出':
print(" <tag>流出</tag>", file=code)
if uncensored == 1:
print(" <tag>无码</tag>", file=code)
if hack_word != '':
print(" <tag>破解</tag>", file=code)
if _4k == '4k':
print(" <tag>4k</tag>", file=code)
try:
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':
print(" <tag>中文字幕</tag>", file=code)
if liuchu == '流出':
print(" <tag>流出</tag>", file=code)
if uncensored == 1:
print(" <tag>无码</tag>", file=code)
if hack_word != '':
print(" <tag>破解</tag>", file=code)
if _4k == '4k':
print(" <tag>4k</tag>", file=code)
for i in tag:
print(" <tag>" + i + "</tag>", file=code)
# print(" <tag>" + series + "</tag>", file=code)
Expand Down

0 comments on commit d724b93

Please sign in to comment.