add socks port
parent
2d071d09d3
commit
21248ecbb4
|
@ -285,6 +285,12 @@ class AnteoPlayer(xbmc.Player):
|
||||||
def __init__(self, userStorageDirectory, torrentUrl, params={}):
|
def __init__(self, userStorageDirectory, torrentUrl, params={}):
|
||||||
self.userStorageDirectory = userStorageDirectory
|
self.userStorageDirectory = userStorageDirectory
|
||||||
self.torrentUrl = torrentUrl
|
self.torrentUrl = torrentUrl
|
||||||
|
if not is_writable(self.userStorageDirectory):
|
||||||
|
xbmcgui.Dialog().ok(Localization.localize('Torrenter v2'),
|
||||||
|
Localization.localize('Your storage path is not writable or not local! Please change it in settings!'),
|
||||||
|
self.storageDirectory)
|
||||||
|
|
||||||
|
sys.exit(1)
|
||||||
xbmc.Player.__init__(self)
|
xbmc.Player.__init__(self)
|
||||||
log("["+author+"Player] Initalized v"+__version__)
|
log("["+author+"Player] Initalized v"+__version__)
|
||||||
self.params = params
|
self.params = params
|
||||||
|
|
|
@ -25,7 +25,8 @@ if proxy == 1:
|
||||||
socks_ip = sys.modules["__main__"].__settings__.getSetting("socks_ip")
|
socks_ip = sys.modules["__main__"].__settings__.getSetting("socks_ip")
|
||||||
import socket
|
import socket
|
||||||
from resources import socks
|
from resources import socks
|
||||||
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, socks_ip, 9050)
|
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, socks_ip,
|
||||||
|
int(sys.modules["__main__"].__settings__.getSetting("socks_port")))
|
||||||
socket.socket = socks.socksocket
|
socket.socket = socks.socksocket
|
||||||
import urllib
|
import urllib
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
|
@ -253,6 +253,12 @@ class InposPlayer(xbmc.Player):
|
||||||
def __init__(self, userStorageDirectory, torrentUrl, params={}):
|
def __init__(self, userStorageDirectory, torrentUrl, params={}):
|
||||||
self.userStorageDirectory = userStorageDirectory
|
self.userStorageDirectory = userStorageDirectory
|
||||||
self.torrentUrl = torrentUrl
|
self.torrentUrl = torrentUrl
|
||||||
|
if not is_writable(self.userStorageDirectory):
|
||||||
|
xbmcgui.Dialog().ok(Localization.localize('Torrenter v2'),
|
||||||
|
Localization.localize('Your storage path is not writable or not local! Please change it in settings!'),
|
||||||
|
self.storageDirectory)
|
||||||
|
|
||||||
|
sys.exit(1)
|
||||||
xbmc.Player.__init__(self)
|
xbmc.Player.__init__(self)
|
||||||
log("["+author+"Player] Initalized v"+__version__)
|
log("["+author+"Player] Initalized v"+__version__)
|
||||||
self.params = params
|
self.params = params
|
||||||
|
|
|
@ -31,7 +31,8 @@ proxy = int(sys.modules["__main__"].__settings__.getSetting("proxy"))
|
||||||
if proxy == 2:
|
if proxy == 2:
|
||||||
socks_ip = sys.modules["__main__"].__settings__.getSetting("socks_ip")
|
socks_ip = sys.modules["__main__"].__settings__.getSetting("socks_ip")
|
||||||
from resources import socks
|
from resources import socks
|
||||||
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, socks_ip, 9050)
|
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, socks_ip,
|
||||||
|
int(sys.modules["__main__"].__settings__.getSetting("socks_port")))
|
||||||
socket.socket = socks.socksocket
|
socket.socket = socks.socksocket
|
||||||
import urllib
|
import urllib
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
|
@ -243,7 +243,7 @@ class SkorbaLoader:
|
||||||
return self.getContentList()[contentId]['size']
|
return self.getContentList()[contentId]['size']
|
||||||
|
|
||||||
def getFilePath(self, contentId=0):
|
def getFilePath(self, contentId=0):
|
||||||
return os.path.join(self.storageDirectory, self.getContentList()[contentId]['title']) # .decode('utf8')
|
return os.path.join(self.storageDirectory, decode_str(self.getContentList()[contentId]['title']))
|
||||||
|
|
||||||
def getContentList(self):
|
def getContentList(self):
|
||||||
filelist = []
|
filelist = []
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="plugin.video.torrenter" name="Torrenter" version="2.6.6" provider-name="inpos">
|
<addon id="plugin.video.torrenter" name="Torrenter" version="2.6.7" provider-name="inpos">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="2.1.0"/>
|
<import addon="xbmc.python" version="2.1.0"/>
|
||||||
<import addon="script.module.libtorrent"/>
|
<import addon="script.module.libtorrent"/>
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
[B]Version 2.6.6[/B]
|
[B]Version 2.6.7[/B]
|
||||||
|
[+] Теперь можно указать порт SOCKS-прокси, при использоании прокси Tor
|
||||||
|
|
||||||
|
[B]Version 2.6.6[/B]
|
||||||
[+] Добавлена поддержка прокси для windows
|
[+] Добавлена поддержка прокси для windows
|
||||||
[+] Теперь можно указать адрес SOCKS-прокси, при использоании прокси Tor
|
[+] Теперь можно указать адрес SOCKS-прокси, при использоании прокси Tor
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
<string id="30047">Proxy for Search</string>
|
<string id="30047">Proxy for Search</string>
|
||||||
<string id="31047">Proxy for Content Lists</string>
|
<string id="31047">Proxy for Content Lists</string>
|
||||||
<string id="32047">SOCKS-proxy IP</string>
|
<string id="32047">SOCKS-proxy IP</string>
|
||||||
|
<string id="32048">SOCKS-proxy Port</string>
|
||||||
<string id="30048">None</string>
|
<string id="30048">None</string>
|
||||||
<string id="30049">Anti-zapret</string>
|
<string id="30049">Anti-zapret</string>
|
||||||
<string id="31050">Tor</string>
|
<string id="31050">Tor</string>
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
<string id="30047">Прокси для поиска</string>
|
<string id="30047">Прокси для поиска</string>
|
||||||
<string id="31047">Прокси для списков медиа</string>
|
<string id="31047">Прокси для списков медиа</string>
|
||||||
<string id="32047">IP SOCKS-прокси</string>
|
<string id="32047">IP SOCKS-прокси</string>
|
||||||
|
<string id="32048">Порт SOCKS-прокси</string>
|
||||||
<string id="30048">Не использовать</string>
|
<string id="30048">Не использовать</string>
|
||||||
<string id="30049">Anti-zapret</string>
|
<string id="30049">Anti-zapret</string>
|
||||||
<string id="31050">Tor</string>
|
<string id="31050">Tor</string>
|
||||||
|
|
|
@ -13,8 +13,9 @@
|
||||||
<setting id="search_phrase" type="text" label="30040"/>
|
<setting id="search_phrase" type="text" label="30040"/>
|
||||||
<setting id="num_threads" type="slider" label="30042" default="3" range="1,1,9" option="int"/>
|
<setting id="num_threads" type="slider" label="30042" default="3" range="1,1,9" option="int"/>
|
||||||
<setting id="proxy" type="enum" lvalues="30048|30049|31050" label="30047" default="0"/>
|
<setting id="proxy" type="enum" lvalues="30048|30049|31050" label="30047" default="0"/>
|
||||||
<setting id="cl_proxy" type="enum" lvalues="30048|31050" label="31047" default="0"/>
|
<setting id="cl_proxy" type="enum" lvalues="30048|31050" label="31047" default="0"/>
|
||||||
<setting id="socks_ip" type="ipaddress" label="32047" default="127.0.0.1" visible="eq(-2,2)|eq(-1,1)"/>
|
<setting id="socks_ip" type="ipaddress" label="32047" default="127.0.0.1" visible="eq(-2,2)|eq(-1,1)"/>
|
||||||
|
<setting id="socks_port" type="number" label="32048" default="9050" visible="eq(-3,2)|eq(-2,1)"/>
|
||||||
<setting id="debug" type="bool" label="30015" default="false"/>
|
<setting id="debug" type="bool" label="30015" default="false"/>
|
||||||
</category>
|
</category>
|
||||||
<category label="30102">
|
<category label="30102">
|
||||||
|
|
Loading…
Reference in New Issue