From 03a8ac71bc239e296105a92fb99366a44a121ac0 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Tue, 4 Aug 2015 17:47:34 +0300 Subject: [PATCH] add_magnet_uri deprecated --- Libtorrent.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Libtorrent.py b/Libtorrent.py index 98ab9f1..2f8bb00 100644 --- a/Libtorrent.py +++ b/Libtorrent.py @@ -159,8 +159,6 @@ class Libtorrent: } progressBar = xbmcgui.DialogProgress() progressBar.create(Localization.localize('Please Wait'), Localization.localize('Magnet-link is converting')) - if not self.session: - self.initSession() self.torrentHandle = self.session.add_torrent(magnetSettings) iterator = 0 while iterator < 100: @@ -171,12 +169,12 @@ class Libtorrent: progressBar.update(0) progressBar.close() return - if self.torrentHandle.has_metadata(): + if self.torrentHandle.status().has_metadata: iterator = 100 progressBar.update(0) progressBar.close() - if self.torrentHandle.has_metadata(): - return self.torrentHandle.get_torrent_info() + if self.torrentHandle.status().has_metadata: + return self.torrentHandle.torrent_file() def magnetToTorrent(self, magnet): self.magnetLink = magnet