Fix quality detection

I WAS SORTING THE WRONG WAY YIKE
This commit is contained in:
Derek Schmidt 2018-06-12 09:54:58 -07:00
parent 279f0cbbf0
commit b2d83131be
Signed by: skeh
GPG key ID: 0F5D491793B4035A

View file

@ -166,7 +166,7 @@ def main(config_path='config.json', seen_path='seen.txt'):
torrents = [torrent for torrent in torrents if torrent.quality >= Resolution(item_config['min-quality'])]
if len(torrents) > 0:
best_entry = sorted(torrents, key=lambda t: t.quality)[0]
best_entry = sorted(torrents, key=lambda t: t.quality, reverse=True)[0]
# Output the magnet / torrent link
printe("Choosing {torrent} as best choice for {show}".format(torrent=torrent.id, show=show.name))
# TODO: transmission-cli subprocess call here?