Skip to content

Commit

Permalink
fix: write unknown actor to nfo (close #151)
Browse files Browse the repository at this point in the history
  • Loading branch information
sqzw-x committed Mar 20, 2024
1 parent a175c97 commit 26af362
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/models/core/nfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,11 @@ def write_nfo(json_data, nfo_new_path, folder_new_path, file_path, edit_mode=Fal
if 'actor_all,' in nfo_include_new:
actor = all_actor
# 有演员时输出演员
if 'actor,' in nfo_include_new and actor:
if 'actor,' in nfo_include_new:
if not actor:
actor = config.actor_no_name
actor_list = actor.split(',') # 字符串转列表
actor_list = [actor.strip() for actor in actor_list if actor.strip()] # 去除空白
# 无演员时输出演员 以文件命名设置中未知演员设置项为演员名,默认设置和空值不写入NFO
elif 'actor,' in nfo_include_new and config.actor_no_name not in ["未知演员", '未知演員', '']:
actor = config.actor_no_name
actor_list = actor.split(',') # 字符串转列表
actor_list = [actor.strip() for actor in actor_list if actor.strip()] # 去除空白
signal.add_log(f'⛑️ 无演员名, 使用手动命名 写入NFO {config.actor_no_name}')
if actor_list:
for each in actor_list:
print(" <actor>", file=code)
Expand Down

0 comments on commit 26af362

Please sign in to comment.