deluge file progress fix
parent
49a24bec2c
commit
a25e598a4b
|
@ -912,6 +912,7 @@ class Deluge:
|
||||||
|
|
||||||
def listfiles(self, id):
|
def listfiles(self, id):
|
||||||
obj = self.get_info()
|
obj = self.get_info()
|
||||||
|
i=0
|
||||||
if obj is None:
|
if obj is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -939,8 +940,11 @@ class Deluge:
|
||||||
|
|
||||||
if x.get('progress'):
|
if x.get('progress'):
|
||||||
percent=int(x['progress']*100)
|
percent=int(x['progress']*100)
|
||||||
|
elif obj.get('file_progress') and len(obj['file_progress'])>=i:
|
||||||
|
percent=int(obj['file_progress'][i]*100)
|
||||||
else:percent=0
|
else:percent=0
|
||||||
|
|
||||||
|
i+=1
|
||||||
res.append([path, percent, x['index'], size])
|
res.append([path, percent, x['index'], size])
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Reference in New Issue