master #1

Merged
djib merged 3 commits from sebastian404/PDMameUpdate:master into master 2019-09-28 08:25:24 +02:00
Showing only changes of commit 8a3d58e745 - Show all commits

12
PDMameUpdate.py Normal file → Executable file
View File

@ -65,8 +65,8 @@ def fetch_local_torrents():
for directory in directories:
match = re_mame_version.match(directory)
if match:
torrents[match[2]]['local-version'] = int(match[1])
torrents[match[2]]['local-name'] = directory
torrents[match.group(2)]['local-version'] = int(match.group(1))
torrents[match.group(2)]['local-name'] = directory
logging.debug('Found the local torrent versions: %s', pformat(torrents))
@ -78,9 +78,9 @@ def fetch_remote_terrents():
for post in d.entries:
match = re_mame_version.match(post.title)
if match:
torrents[match[2]]['remote-version'] = int(match[1])
torrents[match[2]]['remote-link'] = post.link
torrents[match[2]]['remote-name'] = post.title
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))
@ -158,7 +158,7 @@ def fetch_transmission_torrents():
for torrent in client.list().values():
match = re_mame_version.match(torrent['name'])
if match:
torrents[match[2]]['transmission-id'] = torrent['id']
torrents[match.group(2)]['transmission-id'] = torrent['id']
logging.debug('Found the Transmission torrent ids: %s', pformat(torrents))