From 57c518129e3e3830880f8297695b1a7709208ee8 Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Thu, 16 Jul 2015 21:12:26 +0300 Subject: [PATCH] win fix --- addon.xml | 2 +- python_libtorrent/__init__.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/addon.xml b/addon.xml index 2dca2f1..128bfab 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/python_libtorrent/__init__.py b/python_libtorrent/__init__.py index 012021c..0456d7c 100644 --- a/python_libtorrent/__init__.py +++ b/python_libtorrent/__init__.py @@ -31,10 +31,14 @@ if __settings__.getSetting('plugin_name')!=__plugin__: lm.update() log('platform: ' + str(platform)) -log('os: '+str(os.uname())) +if platform['system'] not in ['windows']: + log('os: '+str(os.uname())) + try: - if platform['system'] in ['darwin', 'linux_x86', 'windows']: + if platform['system'] in ['linux_x86', 'windows']: import libtorrent + elif platform['system'] in ['darwin']: + from darwin import * elif platform['system'] in ['linux_x86_64', 'linux_arm']: from ctypes import * dll_path=os.path.join(dest_path, 'libtorrent-rasterbar.so.7')