Use script.module.libtorrent to import libtorrent
In order to support more systems (especially the ones where the libtorrent python bindings cannot be installed manually), the add-on script.module.libtorrent is now used to import libtorrent.
This commit is contained in:
parent
2dc6e8a29f
commit
6f3759a928
|
@ -4,6 +4,7 @@
|
||||||
<import addon="xbmc.python" version="2.25.0"/>
|
<import addon="xbmc.python" version="2.25.0"/>
|
||||||
<import addon="script.module.addon.signals" version="0.0.3"/>
|
<import addon="script.module.addon.signals" version="0.0.3"/>
|
||||||
<import addon="script.module.requests" version="2.22.0"/>
|
<import addon="script.module.requests" version="2.22.0"/>
|
||||||
|
<import addon="script.module.libtorrent" version="1.2.0"/>
|
||||||
</requires>
|
</requires>
|
||||||
<extension point="xbmc.python.pluginsource" library="main.py">
|
<extension point="xbmc.python.pluginsource" library="main.py">
|
||||||
<provides>video</provides>
|
<provides>video</provides>
|
||||||
|
|
|
@ -145,7 +145,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
# Import libtorrent here to manage when the library is not installed
|
# Import libtorrent here to manage when the library is not installed
|
||||||
try:
|
try:
|
||||||
import libtorrent
|
from python_libtorrent import libtorrent
|
||||||
LIBTORRENT_IMPORTED = True
|
LIBTORRENT_IMPORTED = True
|
||||||
except ImportError as exception:
|
except ImportError as exception:
|
||||||
LIBTORRENT_IMPORTED = False
|
LIBTORRENT_IMPORTED = False
|
||||||
|
|
Loading…
Reference in New Issue