sandbox1
parent
b40a7aa0c5
commit
d1923c4fd7
|
@ -264,19 +264,15 @@ class TorrentFS(object):
|
||||||
def __init__(self, root, handle, startIndex):
|
def __init__(self, root, handle, startIndex):
|
||||||
self.root = root
|
self.root = root
|
||||||
self.handle = handle
|
self.handle = handle
|
||||||
logging.info('Start waiting for metadata')
|
|
||||||
self.waitForMetadata()
|
self.waitForMetadata()
|
||||||
logging.info('Metadata is here')
|
|
||||||
self.save_path = localize_path(self.root.torrentParams['save_path'])
|
self.save_path = localize_path(self.root.torrentParams['save_path'])
|
||||||
logging.info('Start getting priorities')
|
|
||||||
self.priorities = list(self.handle.file_priorities())
|
self.priorities = list(self.handle.file_priorities())
|
||||||
logging.info('priorities is here')
|
|
||||||
self.files = self.__files_()
|
self.files = self.__files_()
|
||||||
if startIndex < 0:
|
if startIndex < 0:
|
||||||
logging.info('No -file-index specified, downloading will be paused until any file is requested')
|
logging.info('No -file-index specified, downloading will be paused until any file is requested')
|
||||||
logging.info('Start getting num_files')
|
|
||||||
num_files = self.info.num_files()
|
num_files = self.info.num_files()
|
||||||
logging.info('Snum_files is here')
|
|
||||||
for i in range(num_files):
|
for i in range(num_files):
|
||||||
if startIndex == i:
|
if startIndex == i:
|
||||||
self.setPriority(i, 1)
|
self.setPriority(i, 1)
|
||||||
|
@ -783,18 +779,16 @@ class Pyrrent2http(object):
|
||||||
logging.info('Encryption not supported: %s' % (e.args,))
|
logging.info('Encryption not supported: %s' % (e.args,))
|
||||||
|
|
||||||
def Status(self):
|
def Status(self):
|
||||||
#try:
|
try:
|
||||||
# info = self.torrentHandle.torrent_file()
|
info = self.torrentHandle.torrent_file()
|
||||||
#except:
|
except:
|
||||||
# info = self.torrentHandle.get_torrent_info()
|
info = self.torrentHandle.get_torrent_info()
|
||||||
logging.info('getting status')
|
logging.info('getting status')
|
||||||
tstatus = self.torrentHandle.status()
|
tstatus = self.torrentHandle.status()
|
||||||
logging.info('status is here')
|
logging.info('status is here')
|
||||||
|
|
||||||
status = {
|
status = {
|
||||||
# 'name' : info.name(),
|
'name' : info.name(),
|
||||||
|
|
||||||
'name' : self.TorrentFS.path.split('/')[-1],
|
|
||||||
'state' : int(tstatus.state),
|
'state' : int(tstatus.state),
|
||||||
'state_str' : str(tstatus.state),
|
'state_str' : str(tstatus.state),
|
||||||
'error' : tstatus.error,
|
'error' : tstatus.error,
|
||||||
|
|
Loading…
Reference in New Issue