лишний метод
parent
5e1b05d4a9
commit
10609b85f6
|
@ -215,8 +215,7 @@ class Engine:
|
|||
self._log('ERROR: %s' % (message,))
|
||||
pyrrent2http.logging = Logging(self._log)
|
||||
|
||||
self.pyrrent2http = pyrrent2http.Pyrrent2http()
|
||||
self.pyrrent2http.initConfig(**kwargs)
|
||||
self.pyrrent2http = pyrrent2http.Pyrrent2http(**kwargs)
|
||||
self.pyrrent2http.startSession()
|
||||
self.pyrrent2http.startServices()
|
||||
self.pyrrent2http.addTorrent()
|
||||
|
|
|
@ -522,12 +522,7 @@ def HttpHandlerFactory():
|
|||
return HttpHandler
|
||||
|
||||
class Pyrrent2http(object):
|
||||
def __init__(self):
|
||||
self.torrentHandle = None
|
||||
self.forceShutdown = False
|
||||
self.session = None
|
||||
self.magnet = False
|
||||
def initConfig(self, uri = '', bindAddress = 'localhost:5001', downloadPath = '.',
|
||||
def __init__(self, uri = '', bindAddress = 'localhost:5001', downloadPath = '.',
|
||||
idleTimeout = -1, fileIndex = -1, keepComplete = False,
|
||||
keepIncomplete = False, keepFiles = False, showAllStats = False,
|
||||
showOverallProgress = False, showFilesProgress = False,
|
||||
|
@ -540,6 +535,11 @@ class Pyrrent2http(object):
|
|||
minReconnectTime = 60, maxFailCount = 3, noSparseFile = False,
|
||||
randomPort = False, enableScrape = False, enableDHT = True,
|
||||
enableLSD = True, enableUPNP = True, enableNATPMP = True, enableUTP = True, enableTCP = True):
|
||||
self.torrentHandle = None
|
||||
self.forceShutdown = False
|
||||
self.session = None
|
||||
self.magnet = False
|
||||
|
||||
self.config = Struct()
|
||||
self.config.uri = uri
|
||||
self.config.bindAddress = bindAddress
|
||||
|
|
Loading…
Reference in New Issue