some fixes

pull/15/head
DiMartinoXBMC 2016-12-08 19:15:42 +03:00
parent 82340b5da7
commit 0a85148196
2 changed files with 7 additions and 1 deletions

View File

@ -233,8 +233,9 @@ class SkorbaLoader:
def getContentList(self):
filelist = []
#from functions import decode_str
for contentId, contentFile in enumerate(self.torrentFileInfo.files()):
stringdata = {"title": localize_path(contentFile.path), "size": contentFile.size, "ind": int(contentId),
stringdata = {"title": contentFile.path, "size": contentFile.size, "ind": int(contentId),
'offset': contentFile.offset}
filelist.append(stringdata)
return filelist

View File

@ -45,6 +45,7 @@ class SearchWindow(pyxbmct.AddonDialogWindow):
fileList = []
contentList = []
searchersList = []
addtime = None
right_buttons_count = 6
last_right_buttons_count = 0
last_link = None
@ -154,11 +155,15 @@ class SearchWindow(pyxbmct.AddonDialogWindow):
query = self.input_search.getText()
log('Search query: '+str(query))
if not addtime and query == self.last_query:
addtime = self.addtime
searchersList = get_searchersList(addtime)
#cache
if (query != self.last_query or self.searchersList != searchersList) and len(query)>0:
self.filesList = get_filesList(query, searchersList, addtime)
self.addtime = addtime
self.searchersList = searchersList
self.last_query = query
elif len(query)==0: