From ad889038438238185c2a629fb9cf3282d87664af Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Sun, 15 Jan 2017 20:53:10 +0300 Subject: [PATCH] fix --- Core.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Core.py b/Core.py index 5a49c61..b46322a 100644 --- a/Core.py +++ b/Core.py @@ -1876,10 +1876,14 @@ class Core: f = open(url, 'rb') torrent = f.read() f.close() - from python_libtorrent import get_libtorrent - libtorrent = get_libtorrent() - info = libtorrent.torrent_info(libtorrent.bdecode(torrent)) - name = info.name() + try: + from python_libtorrent import get_libtorrent + libtorrent = get_libtorrent() + info = libtorrent.torrent_info(libtorrent.bdecode(torrent)) + name = info.name() + except: + log('get_libtorrent import error, name = None') + name = None success = Download().add(torrent, dirname) if success: showMessage(self.localize('Torrent-client Browser'), self.localize('Added!'), forced=True)