Fix libtorrent import in addtorrentdialog
This commit is contained in:
parent
c69ed31bd8
commit
c10a83d0aa
@ -31,6 +31,13 @@ import gobject
|
|||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
|
try:
|
||||||
|
import deluge.libtorrent as lt
|
||||||
|
except ImportError:
|
||||||
|
import libtorrent as lt
|
||||||
|
if not (lt.version_major == 0 and lt.version_minor == 14):
|
||||||
|
raise ImportError("This version of Deluge requires libtorrent 0.14!")
|
||||||
|
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.ui.gtkui.listview as listview
|
import deluge.ui.gtkui.listview as listview
|
||||||
@ -171,10 +178,6 @@ class AddTorrentDialog(component.Component):
|
|||||||
break
|
break
|
||||||
|
|
||||||
def add_from_files(self, filenames):
|
def add_from_files(self, filenames):
|
||||||
try:
|
|
||||||
import libtorrent as lt
|
|
||||||
except ImportError:
|
|
||||||
import deluge.libtorrent as lt
|
|
||||||
import os.path
|
import os.path
|
||||||
new_row = None
|
new_row = None
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user