From 659b1c8889cc44a116d63cd9f394e11970da5205 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Sun, 20 Dec 2015 16:50:25 +0300 Subject: [PATCH] magnet fix --- Anteoloader.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Anteoloader.py b/Anteoloader.py index 9a8c4fc..0fae21b 100644 --- a/Anteoloader.py +++ b/Anteoloader.py @@ -217,10 +217,14 @@ class AnteoLoader: return hasher.hexdigest() def magnetToTorrent(self, magnet): - from Libtorrent import Libtorrent - torrent = Libtorrent(self.storageDirectory, self.magnetLink) - torrent.magnetToTorrent(self.magnetLink) - self.torrentFile = torrent.torrentFile + try: + from Libtorrent import Libtorrent + torrent = Libtorrent(self.storageDirectory, magnet) + torrent.magnetToTorrent(self.magnetLink) + self.torrentFile = torrent.torrentFile + except: + self.torrentFile = self.magnetLink + log('[AnteoLoader][magnetToTorrent]: self.torrentFile '+str(self.torrentFile)) class AnteoPlayer(xbmc.Player): __plugin__ = sys.modules["__main__"].__plugin__