resume_file
parent
8c96083790
commit
d4862c12ee
File diff suppressed because it is too large
Load Diff
|
@ -363,12 +363,13 @@ class AnteoPlayer(xbmc.Player):
|
|||
dht_routers = ["router.bittorrent.com:6881","router.utorrent.com:6881"]
|
||||
user_agent = 'uTorrent/2200(24683)'
|
||||
self.pre_buffer_bytes = int(self.__settings__.getSetting("pre_buffer_bytes"))*1024*1024
|
||||
resume_file=os.path.join(self.userStorageDirectory, 'torrents', os.path.basename(self.torrentUrl)+'.resume_data')
|
||||
|
||||
self.engine = Engine(uri=file_url(self.torrentUrl), download_path=self.userStorageDirectory,
|
||||
connections_limit=connections_limit, download_kbps=download_limit, upload_kbps=upload_limit,
|
||||
encryption=encryption, keep_complete=keep_complete, keep_incomplete=keep_incomplete,
|
||||
dht_routers=dht_routers, use_random_port=use_random_port, listen_port=listen_port,
|
||||
keep_files=keep_files, user_agent=user_agent)
|
||||
keep_files=keep_files, user_agent=user_agent, resume_file=resume_file)
|
||||
|
||||
def buffer(self):
|
||||
self.pre_buffer_bytes = 30*1024*1024 #30 MB
|
||||
|
|
|
@ -97,7 +97,7 @@ class SearcherABC:
|
|||
try:
|
||||
if os.path.exists(cookie): self.cookieJar.load(ignore_discard=True)
|
||||
except:
|
||||
self.log(self.__plugin__+' [load_cookie]: os.remove(cookie)')
|
||||
self.log('[load_cookie]: os.remove(cookie)')
|
||||
os.remove(cookie)
|
||||
self.cookieJar = cookielib.MozillaCookieJar(cookie)
|
||||
|
||||
|
@ -106,7 +106,7 @@ class SearcherABC:
|
|||
self.cookieJar = cookielib.MozillaCookieJar(cookie)
|
||||
if os.path.exists(cookie):
|
||||
os.remove(cookie)
|
||||
self.log(self.__plugin__+' [clear_cookie]: cookie cleared')
|
||||
self.log('[clear_cookie]: cookie cleared')
|
||||
|
||||
def makeRequest(self, url, data={}, headers={}):
|
||||
self.load_cookie()
|
||||
|
@ -133,13 +133,13 @@ class SearcherABC:
|
|||
response = opener.open(url, encodedData)
|
||||
except urllib2.HTTPError as e:
|
||||
if e.code == 404:
|
||||
self.log(self.__plugin__+' [makeRequest]: Not Found! HTTP Error, e.code=' + str(e.code))
|
||||
self.log('[makeRequest]: Not Found! HTTP Error, e.code=' + str(e.code))
|
||||
return
|
||||
elif e.code in [503]:
|
||||
self.log(self.__plugin__+' [makeRequest]: Denied, HTTP Error, e.code=' + str(e.code))
|
||||
self.log('[makeRequest]: Denied, HTTP Error, e.code=' + str(e.code))
|
||||
return
|
||||
else:
|
||||
self.log(self.__plugin__+' [makeRequest]: HTTP Error, e.code=' + str(e.code))
|
||||
self.log('[makeRequest]: HTTP Error, e.code=' + str(e.code))
|
||||
return
|
||||
#self.cookieJar.extract_cookies(response, urllib2)
|
||||
if response.info().get('Content-Encoding') == 'gzip':
|
||||
|
@ -242,10 +242,10 @@ class SearcherABC:
|
|||
pass
|
||||
|
||||
def log(self, msg):
|
||||
log(msg)
|
||||
log('[%s] ' % self.__plugin__ +msg)
|
||||
|
||||
def debug(self, msg):
|
||||
debug(msg)
|
||||
debug('[%s] ' % self.__plugin__ +msg)
|
||||
|
||||
def open2(self, url=''):
|
||||
import httplib
|
||||
|
|
Loading…
Reference in New Issue