fix kickass small sizes
This commit is contained in:
parent
56ac2efa95
commit
f0b7e14a01
1 changed files with 12 additions and 10 deletions
|
|
@ -26,11 +26,12 @@ __all__ = ['TorrentsPage']
|
|||
|
||||
class TorrentsPage(BasePage):
|
||||
def unit(self, n, u):
|
||||
m = {'KB': 1024,
|
||||
'MB': 1024*1024,
|
||||
'GB': 1024*1024*1024,
|
||||
'TB': 1024*1024*1024*1024,
|
||||
}
|
||||
m = {'bytes': 1,
|
||||
'KB': 1024,
|
||||
'MB': 1024*1024,
|
||||
'GB': 1024*1024*1024,
|
||||
'TB': 1024*1024*1024*1024,
|
||||
}
|
||||
return float(n*m[u])
|
||||
|
||||
def iter_torrents(self):
|
||||
|
|
@ -64,11 +65,12 @@ class TorrentsPage(BasePage):
|
|||
|
||||
class TorrentPage(BasePage):
|
||||
def unit(self, n, u):
|
||||
m = {'KB': 1024,
|
||||
'MB': 1024*1024,
|
||||
'GB': 1024*1024*1024,
|
||||
'TB': 1024*1024*1024*1024,
|
||||
}
|
||||
m = {'bytes': 1,
|
||||
'KB': 1024,
|
||||
'MB': 1024*1024,
|
||||
'GB': 1024*1024*1024,
|
||||
'TB': 1024*1024*1024*1024,
|
||||
}
|
||||
return float(n*m[u])
|
||||
|
||||
def get_torrent(self, id):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue