Skip to content

Commit

Permalink
Some sizes as snarfed are in human format
Browse files Browse the repository at this point in the history
Might need to be fixed while loading data if more bugs arise
  • Loading branch information
kannibalox committed Nov 25, 2018
1 parent ac0a61e commit 607c32b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ptpapi/movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ def best_match(self, profile):
LOGGER.debug("%i matches after filtering by parameter '%s'", len(matches), name)
sort_dict = {
'most recent': (True, (lambda t: datetime.strptime(t['UploadTime'], "%Y-%m-%d %H:%M:%S"))),
'smallest': (False, (lambda t: int(t['Size']))),
'smallest': (False, (lambda t: human_to_bytes(t['Size']))),
'most seeders': (True, (lambda t: int(t['Seeders']))),
'largest': (True, (lambda t: int(t['Size']))),
'largest': (True, (lambda t: human_to_bytes(t['Size']))),
}
if len(matches) == 1:
return matches[0]
Expand Down

0 comments on commit 607c32b

Please sign in to comment.