Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Sep 15, 2023
1 parent 4367c53 commit d1368c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/chain/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,11 @@ def process(self, mediainfo: MediaInfo,
continue
# 在副标题中判断是否存在标题与原语种标题
if torrent.description:
if str(mediainfo.title) in torrent.description \
or str(mediainfo.original_title) in torrent.description:
subtitle = torrent.description.split()
if (StringUtils.is_chinese(mediainfo.title)
and str(mediainfo.title) in subtitle) \
or (StringUtils.is_chinese(mediainfo.original_title)
and str(mediainfo.original_title) in subtitle):
logger.info(f'{mediainfo.title} 通过副标题匹配到资源:{torrent.site_name} - {torrent.title},'
f'副标题:{torrent.description}')
_match_torrents.append(torrent)
Expand Down

0 comments on commit d1368c4

Please sign in to comment.