From 279520c9fecaa99556380378670d327318df2fa8 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Tue, 4 Aug 2015 17:26:35 +0300 Subject: [PATCH] add_magnet_uri deprecated --- Libtorrent.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Libtorrent.py b/Libtorrent.py index 3503f6f..98ab9f1 100644 --- a/Libtorrent.py +++ b/Libtorrent.py @@ -150,6 +150,7 @@ class Libtorrent: def getMagnetInfo(self): magnetSettings = { + 'url': self.magnetLink, 'save_path': self.storageDirectory, 'storage_mode': self.lt.storage_mode_t(0), 'paused': True, @@ -158,7 +159,9 @@ class Libtorrent: } progressBar = xbmcgui.DialogProgress() progressBar.create(Localization.localize('Please Wait'), Localization.localize('Magnet-link is converting')) - self.torrentHandle = self.lt.add_magnet_uri(self.session, self.magnetLink, magnetSettings) + if not self.session: + self.initSession() + self.torrentHandle = self.session.add_torrent(magnetSettings) iterator = 0 while iterator < 100: xbmc.sleep(500)