Fixed sorting by ETA
This commit is contained in:
parent
9abfc5b250
commit
f7a4951e0d
|
@ -551,6 +551,9 @@ class AllTorrents(BaseMode, component.Component):
|
||||||
else:
|
else:
|
||||||
result = sorted(result, cmp_func, sort_key, reverse)
|
result = sorted(result, cmp_func, sort_key, reverse)
|
||||||
|
|
||||||
|
if field == "eta":
|
||||||
|
result = sorted(result, key=lambda s: state.get(s)["eta"] == 0)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
#Just in case primary and secondary fields are empty and/or
|
#Just in case primary and secondary fields are empty and/or
|
||||||
|
|
Loading…
Reference in New Issue