Fixed sorting by ETA

This commit is contained in:
Asmageddon 2012-06-01 21:04:02 +02:00
parent 9abfc5b250
commit f7a4951e0d
1 changed files with 3 additions and 0 deletions

View File

@ -551,6 +551,9 @@ class AllTorrents(BaseMode, component.Component):
else:
result = sorted(result, cmp_func, sort_key, reverse)
if field == "eta":
result = sorted(result, key=lambda s: state.get(s)["eta"] == 0)
return result
#Just in case primary and secondary fields are empty and/or