fix
parent
ff7ef919a4
commit
ad88903843
12
Core.py
12
Core.py
|
@ -1876,10 +1876,14 @@ class Core:
|
||||||
f = open(url, 'rb')
|
f = open(url, 'rb')
|
||||||
torrent = f.read()
|
torrent = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
from python_libtorrent import get_libtorrent
|
try:
|
||||||
libtorrent = get_libtorrent()
|
from python_libtorrent import get_libtorrent
|
||||||
info = libtorrent.torrent_info(libtorrent.bdecode(torrent))
|
libtorrent = get_libtorrent()
|
||||||
name = info.name()
|
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)
|
success = Download().add(torrent, dirname)
|
||||||
if success:
|
if success:
|
||||||
showMessage(self.localize('Torrent-client Browser'), self.localize('Added!'), forced=True)
|
showMessage(self.localize('Torrent-client Browser'), self.localize('Added!'), forced=True)
|
||||||
|
|
Loading…
Reference in New Issue