sandbox1
parent
ad18f4e1d0
commit
afdd8cc3c2
|
@ -279,7 +279,8 @@ class TorrentFS(object):
|
||||||
self.setPriority(i, 1)
|
self.setPriority(i, 1)
|
||||||
else:
|
else:
|
||||||
self.setPriority(i, 0)
|
self.setPriority(i, 0)
|
||||||
|
def Status(self):
|
||||||
|
return self.handle.status()
|
||||||
def Shutdown(self):
|
def Shutdown(self):
|
||||||
self.shuttingDown = True
|
self.shuttingDown = True
|
||||||
if len(self.openedFiles) > 0:
|
if len(self.openedFiles) > 0:
|
||||||
|
@ -784,21 +785,22 @@ class Pyrrent2http(object):
|
||||||
info = self.TorrentFS.info
|
info = self.TorrentFS.info
|
||||||
#tstatus = self.torrentHandle.status()
|
#tstatus = self.torrentHandle.status()
|
||||||
#tstatus = self.TorrentFS.handle.status()
|
#tstatus = self.TorrentFS.handle.status()
|
||||||
|
tstatus = self.TorrentFS.Status()
|
||||||
|
|
||||||
status = {
|
status = {
|
||||||
'name' : info.name(),
|
'name' : info.name(),
|
||||||
'state' : int(self.torrentHandle.status().state),
|
'state' : int(tstatus.state),
|
||||||
'state_str' : str(self.torrentHandle.status().state),
|
'state_str' : str(tstatus.state),
|
||||||
'error' : self.torrentHandle.status().error,
|
'error' : tstatus.error,
|
||||||
'progress' : self.torrentHandle.status().progress,
|
'progress' : tstatus.progress,
|
||||||
'download_rate' : self.torrentHandle.status().download_rate / 1024,
|
'download_rate' : tstatus.download_rate / 1024,
|
||||||
'upload_rate' : self.torrentHandle.status().upload_rate / 1024,
|
'upload_rate' : tstatus.upload_rate / 1024,
|
||||||
'total_download' : self.torrentHandle.status().total_download,
|
'total_download' : tstatus.total_download,
|
||||||
'total_upload' : self.torrentHandle.status().total_upload,
|
'total_upload' : tstatus.total_upload,
|
||||||
'num_peers' : self.torrentHandle.status().num_peers,
|
'num_peers' : tstatus.num_peers,
|
||||||
'num_seeds' : self.torrentHandle.status().num_seeds,
|
'num_seeds' : tstatus.num_seeds,
|
||||||
'total_seeds' : self.torrentHandle.status().num_complete,
|
'total_seeds' : tstatus.num_complete,
|
||||||
'total_peers' : self.torrentHandle.status().num_incomplete
|
'total_peers' : tstatus.num_incomplete
|
||||||
}
|
}
|
||||||
return status
|
return status
|
||||||
def Ls(self):
|
def Ls(self):
|
||||||
|
|
Loading…
Reference in New Issue