pull/11/head
DiMartinoXBMC 2016-03-29 18:57:54 +03:00
parent aab077f4a7
commit fc14f8e260
3 changed files with 5 additions and 11 deletions

View File

@ -245,7 +245,7 @@ class AnteoLoader:
self.torrentFile = torrent.torrentFile
except:
self.torrentFile = magnet
log('[AnteoLoader][magnetToTorrent]: self.torrentFile '+str(self.torrentFile))
log('[AnteoLoader][magnetToTorrent]: self.torrentFile '+ensure_str(self.torrentFile))
class AnteoPlayer(xbmc.Player):
__plugin__ = sys.modules["__main__"].__plugin__

View File

@ -212,7 +212,7 @@ class InposLoader:
self.torrentFile = torrent.torrentFile
except:
self.torrentFile = magnet
log('['+author+'Loader][magnetToTorrent]: self.torrentFile '+str(self.torrentFile))
log('['+author+'Loader][magnetToTorrent]: self.torrentFile '+ensure_str((self.torrentFile)))
class InposPlayer(xbmc.Player):
__plugin__ = sys.modules["__main__"].__plugin__

View File

@ -26,7 +26,7 @@ import tempfile
import hashlib
import os
from StringIO import StringIO
import gzip
import zlib
import socket
import sys
@ -114,12 +114,6 @@ class SearcherABC:
except:
showMessage('AntiZapret', Localization.localize('Error'))
self.debug('[antizapret]: OFF!')
#elif self.proxy == 2:
# from resources.proxy import immunicity
# opener = urllib2.build_opener(immunicity.ImmunicityProxyHandler(), urllib2.HTTPCookieProcessor(self.cookieJar))
# config = immunicity.config()
# self.debug('[immunicity]: '+str(config["domains"]))
# self.debug('[immunicity]: '+str(config["server"]))
if not opener:
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookieJar))
opener.addheaders = headers
@ -142,8 +136,8 @@ class SearcherABC:
#self.cookieJar.extract_cookies(response, urllib2)
if response.info().get('Content-Encoding') == 'gzip':
buf = StringIO(response.read())
f = gzip.GzipFile(fileobj=buf)
response = f.read()
decomp = zlib.decompressobj(16 + zlib.MAX_WBITS)
response = decomp.decompress(buf.getvalue())
else:
response = response.read()
return response