diff --git a/SkorbaLoader.py b/SkorbaLoader.py index b58d1f5..b8e3cd7 100644 --- a/SkorbaLoader.py +++ b/SkorbaLoader.py @@ -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 diff --git a/searchwindow.py b/searchwindow.py index e9b8159..0c664ea 100644 --- a/searchwindow.py +++ b/searchwindow.py @@ -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: