script.module.libtorrent update is comming

pull/1/head
DiMartinoXBMC 2015-06-28 13:47:37 +03:00
parent 01a4599136
commit 3ca766bf0e
2 changed files with 14 additions and 8 deletions

View File

@ -24,7 +24,7 @@ import os
import urllib2
import hashlib
import re
import sys
# import sys
from StringIO import StringIO
import gzip
@ -101,7 +101,7 @@ class Libtorrent:
print 'Error importing python_libtorrent.' + system + '. Exception: ' + str(e)
pass
#from ctypes import *
#cdll.LoadLibrary(dirname + '/libtorrent-rasterbar.so.7')'''
#cdll.LoadLibrary(dirname + '/libtorrent-rasterbar.so.7')
self.platform = get_platform()
@ -124,12 +124,21 @@ class Libtorrent:
'system']
except Exception, e:
print 'Error importing python_libtorrent.' + self.platform['system'] + '. Exception: ' + str(e)
pass
pass'''
self.platform = get_platform()
try:
import libtorrent
except:
import python_libtorrent as libtorrent
try:
self.lt = libtorrent
del libtorrent
except:
print 'Imported libtorrent v' + self.lt.version + ' from python_libtorrent.' + self.platform[
'system']
except Exception, e:
print 'Error importing python_libtorrent.' + self.platform['system'] + '. Exception: ' + str(e)
xbmcgui.Dialog().ok(Localization.localize('Python-Libtorrent Not Found'),
Localization.localize(self.platform["message"][0]),
Localization.localize(self.platform["message"][1]))

View File

@ -60,6 +60,3 @@ def get_platform():
'But you can use torrent-client control functions.']
return ret
PLATFORM = get_platform()