From 0ef9b6ab9b6a063ce5c8f0a68652c4a1172ec87e Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Wed, 22 Jul 2015 00:04:18 +0300 Subject: [PATCH] external dl --- Core.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Core.py b/Core.py index 3d0faf8..b6dc3e6 100644 --- a/Core.py +++ b/Core.py @@ -1693,14 +1693,7 @@ class Core: classMatch = re.search('(\w+)::(.+)', url) if classMatch: searcher = classMatch.group(1) - if self.ROOT + os.sep + 'resources' + os.sep + 'searchers' not in sys.path: - sys.path.insert(0, self.ROOT + os.sep + 'resources' + os.sep + 'searchers') - try: - searcherObject = getattr(__import__(searcher), searcher)() - except Exception, e: - print 'Unable to use searcher: ' + searcher + ' at ' + self.__plugin__ + ' openTorrent(). Exception: ' + str(e) - return - url = searcherObject.getTorrentFile(classMatch.group(2)) + url = Searchers().downloadWithSearcher(classMatch.group(2), searcher) torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory) torrent.initSession() encryption = self.__settings__.getSetting('encryption') == 'true'