From ba8d5ac74f03fecf16223061445fc60fbb787972 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Wed, 9 Mar 2016 21:12:01 +0300 Subject: [PATCH] kodi 17 fix --- python_libtorrent/{ => python_libtorrent}/__init__.py | 9 +++++---- python_libtorrent/{ => python_libtorrent}/functions.py | 0 python_libtorrent/{ => python_libtorrent}/net.py | 0 3 files changed, 5 insertions(+), 4 deletions(-) rename python_libtorrent/{ => python_libtorrent}/__init__.py (93%) rename python_libtorrent/{ => python_libtorrent}/functions.py (100%) rename python_libtorrent/{ => python_libtorrent}/net.py (100%) diff --git a/python_libtorrent/__init__.py b/python_libtorrent/python_libtorrent/__init__.py similarity index 93% rename from python_libtorrent/__init__.py rename to python_libtorrent/python_libtorrent/__init__.py index b009f4c..ae0fee0 100644 --- a/python_libtorrent/__init__.py +++ b/python_libtorrent/python_libtorrent/__init__.py @@ -32,6 +32,7 @@ __settings__ = xbmcaddon.Addon(id='script.module.libtorrent') __version__ = __settings__.getAddonInfo('version') __plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ __language__ = __settings__.getLocalizedString +__root__ = os.path.dirname(os.path.dirname(__file__)) libtorrent=None platform = get_platform() @@ -54,16 +55,16 @@ if getSettingAsBool('custom_version'): else: platform['version'] = default_path -sizefile_path = os.path.join(os.path.dirname(__file__), platform['system'], platform['version']) +sizefile_path = os.path.join(__root__, platform['system'], platform['version']) if not os.path.exists(sizefile_path): log('set_version: no sizefile at %s back to default %s' % (sizefile_path, default_path)) platform['version'] = default_path - sizefile_path = os.path.join(os.path.dirname(__file__), platform['system'], platform['version']) + sizefile_path = os.path.join(__root__, platform['system'], platform['version']) if not os.path.exists(sizefile_path): log('set_version: no default at %s searching for any version' % sizefile_path) - versions = os.listdir(os.path.join(os.path.dirname(__file__), platform['system'])) + versions = os.listdir(os.path.join(__root__, platform['system'])) for ver in versions: - if not os.path.isdir(os.path.join(os.path.dirname(__file__), platform['system'], ver)): + if not os.path.isdir(os.path.join(__root__, platform['system'], ver)): versions.remove(ver) if len(versions)>0: diff --git a/python_libtorrent/functions.py b/python_libtorrent/python_libtorrent/functions.py similarity index 100% rename from python_libtorrent/functions.py rename to python_libtorrent/python_libtorrent/functions.py diff --git a/python_libtorrent/net.py b/python_libtorrent/python_libtorrent/net.py similarity index 100% rename from python_libtorrent/net.py rename to python_libtorrent/python_libtorrent/net.py