From 6f3759a928090621d54496b9c9b8f07fcc75095d Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 19 May 2021 17:18:00 +0000 Subject: [PATCH] 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. --- addon.xml | 1 + service.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addon.xml b/addon.xml index 7f68378..cf738b1 100644 --- a/addon.xml +++ b/addon.xml @@ -4,6 +4,7 @@ + video diff --git a/service.py b/service.py index b68145a..7c406b1 100644 --- a/service.py +++ b/service.py @@ -145,7 +145,7 @@ if __name__ == "__main__": # Import libtorrent here to manage when the library is not installed try: - import libtorrent + from python_libtorrent import libtorrent LIBTORRENT_IMPORTED = True except ImportError as exception: LIBTORRENT_IMPORTED = False