Fix bug in remote torrents matching

This commit is contained in:
2020-10-20 11:15:18 +02:00
parent 0b282348d7
commit 769a9ccc00

View File

@ -125,10 +125,10 @@ def fetch_remote_torrents():
d = feedparser.parse('http://www.pleasuredome.org.uk/rss.xml')
for post in d.entries:
for regexp in regexps:
match = regexp.match(post.title)
match = regexp.search(post.title)
if match:
matched_version = match.group(0)
matched_torrent = regexp.sub('#', post.title)
matched_torrent = torrents[regexp.sub('#', post.title)]
if matched_version > matched_torrent.get('remote-version', ''):
matched_torrent['remote-version'] = matched_version
matched_torrent['remote-link'] = post.link