Only newest version of torrents with multiple versions are added #2

Merged
djib merged 1 commits from sebastian404/PDMameUpdate:master into master 2019-10-29 12:45:27 +01:00
Showing only changes of commit 0111310674 - Show all commits

View File

@ -82,9 +82,12 @@ def fetch_remote_terrents():
for post in d.entries: for post in d.entries:
match = re_mame_version.match(post.title) match = re_mame_version.match(post.title)
if match: if match:
torrents[match.group(2)]['remote-version'] = int(match.group(1)) try:
torrents[match.group(2)]['remote-link'] = post.link torrents[match.group(2)]['remote-version']
torrents[match.group(2)]['remote-name'] = post.title except KeyError:
torrents[match.group(2)]['remote-version'] = int(match.group(1))
torrents[match.group(2)]['remote-link'] = post.link
torrents[match.group(2)]['remote-name'] = post.title
logging.debug('Found the remote torrent versions: %s', pformat(torrents)) logging.debug('Found the remote torrent versions: %s', pformat(torrents))