Skip to content

Commit

Permalink
Fix #205: 添加选项控制是否采用javdb的封面
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuukiy committed Feb 25, 2024
1 parent e76caa1 commit aae4612
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions JavSP.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ def info_summary(movie: Movie, all_info: Dict[str, MovieInfo]):
final_info.dvdid = final_id
else:
final_info.cid = final_id
# javdb封面有水印,优先采用其他站点的封面
javdb_cover = getattr(all_info.get('javdb'), 'cover', None)
if javdb_cover is not None:
if cfg.Crawler.ignore_javdb_cover == 'auto':
covers.remove(javdb_cover)
covers.append(javdb_cover)
elif cfg.getboolean('Crawler', 'ignore_javdb_cover'):
covers.remove(javdb_cover)
setattr(final_info, 'covers', covers)
setattr(final_info, 'big_covers', big_covers)
# 对cover和big_cover赋值,避免后续检查必须字段时出错
Expand Down
2 changes: 2 additions & 0 deletions core/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ title__remove_actor = yes
title__chinese_first = yes
# 刮削一部电影后的等待时间(秒,设置为0禁用此功能)
sleep_after_scraping = 1
# 禁用javdb的封面(auto/yes/no, 默认auto: 如果能从别的站点获得封面则不用javdb的以避免水印)
ignore_javdb_cover = auto


# 各个站点的免代理地址。地址失效时软件会自动尝试获取新地址,你也可以手动设置
Expand Down

0 comments on commit aae4612

Please sign in to comment.