Print out the resolution name
Help make sure something like b2d8313
doesnt happen again
This commit is contained in:
parent
b2d83131be
commit
6262e7c3aa
1 changed files with 4 additions and 1 deletions
|
@ -35,6 +35,9 @@ class Resolution:
|
|||
else:
|
||||
raise ValueError("Did not recongnize resolution name. See Resolution.names")
|
||||
|
||||
def getNormalizedName(self):
|
||||
return self.family[0]
|
||||
|
||||
# Rich comparison support
|
||||
def __lt__(self, other):
|
||||
if not isinstance(other, Resolution):
|
||||
|
@ -168,7 +171,7 @@ def main(config_path='config.json', seen_path='seen.txt'):
|
|||
if len(torrents) > 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))
|
||||
printe("Choosing {torrent} as best choice for {show} (quality: {res})".format(torrent=best_entry.id, show=show.name, res=best_entry.quality.getNormalizedName()))
|
||||
# TODO: transmission-cli subprocess call here?
|
||||
print(best_entry.link)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue