Skip to content

Commit

Permalink
支持是否将片商和发行写入genre
Browse files Browse the repository at this point in the history
  • Loading branch information
todoXu committed Dec 21, 2023
1 parent eaedc84 commit 9cf74e2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
12 changes: 11 additions & 1 deletion JavSP.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,20 @@ def info_summary(movie: Movie, all_info: Dict[str, MovieInfo]):
# genre
if 'javdb' in all_info:
final_info.genre = all_info['javdb'].genre
if cfg.NFO.add_producer_publisher_to_genre:
if all_info['javdb'].publisher:
final_info.genre.append("发行:{}".format(all_info['javdb'].publisher))
if all_info['javdb'].producer:
final_info.genre.append("片商:{}".format(all_info['javdb'].producer))
else:
for name, data in all_info.items():
if data.genre != None:
final_info.genre = all_info[name].genre
if cfg.NFO.add_producer_publisher_to_genre:
if all_info[name].publisher:
final_info.genre.append("发行:{}".format(all_info[name].publisher))
if all_info[name].producer:
final_info.genre.append("片商:{}".format(all_info[name].producer))
break

if not final_info.genre:
Expand All @@ -161,7 +171,7 @@ def info_summary(movie: Movie, all_info: Dict[str, MovieInfo]):
final_info.genre.append('内嵌字幕')
if movie.uncensored:
final_info.genre.append('无码流出/破解')

########## 移除所有抓取器数据中,标题尾部的女优名 ##########
if cfg.Crawler.title__remove_actor:
for name, data in all_info.items():
Expand Down
2 changes: 2 additions & 0 deletions core/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ bing_key =
[NFO]
# 同时将genre写入到tag?
add_genre_to_tag = yes
# 是否将发行和片商写入到tag
add_producer_publisher_to_genre = yes

[Other]
# 是否允许检查更新。如果允许,在有新版本时会显示提示信息和新版功能
Expand Down
1 change: 1 addition & 0 deletions core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ def norm_boolean(cfg: Config):
('Picture', 'use_big_cover'),
('Picture', 'use_ai_crop'),
('NFO', 'add_genre_to_tag'),
('NFO', 'add_producer_publisher_to_genre'),
('Other', 'check_update'),
('Other', 'auto_update')
]:
Expand Down

0 comments on commit 9cf74e2

Please sign in to comment.