settings only for active searchers
parent
56c3f89338
commit
49de8f6eb9
|
@ -250,7 +250,7 @@ class ControlCenter(AddonDialogWindow):
|
||||||
__settings__.openSettings()
|
__settings__.openSettings()
|
||||||
|
|
||||||
def openSearcherSettings(self):
|
def openSearcherSettings(self):
|
||||||
slist = Searchers().list('external').keys()
|
slist=Searchers().activeExternal()
|
||||||
if len(slist)>0:
|
if len(slist)>0:
|
||||||
ret = xbmcgui.Dialog().select(__language__(30418), slist)
|
ret = xbmcgui.Dialog().select(__language__(30418), slist)
|
||||||
if ret > -1 and ret < len(slist):
|
if ret > -1 and ret < len(slist):
|
||||||
|
|
14
functions.py
14
functions.py
|
@ -1123,7 +1123,7 @@ class Searchers():
|
||||||
get_active = []
|
get_active = []
|
||||||
for searcher in self.list().keys():
|
for searcher in self.list().keys():
|
||||||
if self.old(searcher): get_active.append(searcher + '.py')
|
if self.old(searcher): get_active.append(searcher + '.py')
|
||||||
print 'Active Searchers: ' + str(get_active)
|
log('Active Searchers: ' + str(get_active))
|
||||||
return get_active
|
return get_active
|
||||||
|
|
||||||
def searchWithSearcher(self, keyword, searcher):
|
def searchWithSearcher(self, keyword, searcher):
|
||||||
|
@ -1163,6 +1163,12 @@ class Searchers():
|
||||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
xbmc.executebuiltin('Dialog.Close(all,true)')
|
||||||
xbmc.executebuiltin('XBMC.ActivateWindow(Addonbrowser,addons://search/%s)' % ('Torrenter Searcher %s' % searcher))
|
xbmc.executebuiltin('XBMC.ActivateWindow(Addonbrowser,addons://search/%s)' % ('Torrenter Searcher %s' % searcher))
|
||||||
|
|
||||||
|
def activeExternal(self):
|
||||||
|
slist = []
|
||||||
|
for searcher in self.list('external').keys():
|
||||||
|
if self.old(searcher): slist.append(searcher)
|
||||||
|
return slist
|
||||||
|
|
||||||
|
|
||||||
def search(url, searchersList, isApi=None):
|
def search(url, searchersList, isApi=None):
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
@ -1171,7 +1177,11 @@ def search(url, searchersList, isApi=None):
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
|
|
||||||
num_threads = 3
|
num_threads=__settings__.getSetting('num_threads')
|
||||||
|
if num_threads not in ['',None] and int(num_threads)>0:
|
||||||
|
num_threads = int(num_threads)
|
||||||
|
else:
|
||||||
|
num_threads = 3
|
||||||
queue = Queue()
|
queue = Queue()
|
||||||
result = {}
|
result = {}
|
||||||
iterator, filesList, left_searchers = 0, [], []
|
iterator, filesList, left_searchers = 0, [], []
|
||||||
|
|
Loading…
Reference in New Issue