pull/15/head
DiMartinoXBMC 2017-01-15 20:53:10 +03:00
parent ff7ef919a4
commit ad88903843
1 changed files with 8 additions and 4 deletions

View File

@ -1876,10 +1876,14 @@ class Core:
f = open(url, 'rb')
torrent = f.read()
f.close()
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)