статус слишком долго возвращается

sandbox1
inpos 2016-03-17 21:24:38 +03:00
parent 2a3a06345d
commit ad18f4e1d0
1 changed files with 13 additions and 13 deletions

View File

@ -783,22 +783,22 @@ class Pyrrent2http(object):
def Status(self): def Status(self):
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()
status = { status = {
'name' : info.name(), 'name' : info.name(),
'state' : int(tstatus.state), 'state' : int(self.torrentHandle.status().state),
'state_str' : str(tstatus.state), 'state_str' : str(self.torrentHandle.status().state),
'error' : tstatus.error, 'error' : self.torrentHandle.status().error,
'progress' : tstatus.progress, 'progress' : self.torrentHandle.status().progress,
'download_rate' : tstatus.download_rate / 1024, 'download_rate' : self.torrentHandle.status().download_rate / 1024,
'upload_rate' : tstatus.upload_rate / 1024, 'upload_rate' : self.torrentHandle.status().upload_rate / 1024,
'total_download' : tstatus.total_download, 'total_download' : self.torrentHandle.status().total_download,
'total_upload' : tstatus.total_upload, 'total_upload' : self.torrentHandle.status().total_upload,
'num_peers' : tstatus.num_peers, 'num_peers' : self.torrentHandle.status().num_peers,
'num_seeds' : tstatus.num_seeds, 'num_seeds' : self.torrentHandle.status().num_seeds,
'total_seeds' : tstatus.num_complete, 'total_seeds' : self.torrentHandle.status().num_complete,
'total_peers' : tstatus.num_incomplete 'total_peers' : self.torrentHandle.status().num_incomplete
} }
return status return status
def Ls(self): def Ls(self):