[Console] Fix showing file priorites
This commit is contained in:
parent
beb4f8c8f9
commit
52a85cb91c
|
@ -15,6 +15,7 @@ from unicodedata import normalize as ud_normalize
|
||||||
from unicodedata import east_asian_width
|
from unicodedata import east_asian_width
|
||||||
|
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
from deluge.ui.common import FILE_PRIORITY
|
||||||
|
|
||||||
|
|
||||||
def format_speed(speed):
|
def format_speed(speed):
|
||||||
|
@ -70,13 +71,9 @@ def format_pieces(num, size):
|
||||||
def format_priority(prio):
|
def format_priority(prio):
|
||||||
if prio == -2:
|
if prio == -2:
|
||||||
return '[Mixed]'
|
return '[Mixed]'
|
||||||
if prio < 0:
|
elif prio < 0:
|
||||||
return '-'
|
return '-'
|
||||||
pstring = deluge.common.FILE_PRIORITY[prio]
|
return FILE_PRIORITY[prio]
|
||||||
if prio > 0:
|
|
||||||
return pstring[:pstring.index('Priority') - 1]
|
|
||||||
else:
|
|
||||||
return pstring
|
|
||||||
|
|
||||||
|
|
||||||
def trim_string(string, w, have_dbls):
|
def trim_string(string, w, have_dbls):
|
||||||
|
|
Loading…
Reference in New Issue