delete pulsar

pull/3/head
DiMartinoXBMC 2016-03-14 00:23:00 +03:00
parent c08f0c3b0e
commit 5879013616
3 changed files with 606 additions and 597 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,8 +32,7 @@ import xbmcgui
import xbmcvfs import xbmcvfs
import Localization import Localization
from functions import isSubtitle, DownloadDB, log, debug, is_writable,\ from functions import isSubtitle, DownloadDB, log, debug, is_writable,\
vista_check, windows_check, localize_path vista_check, windows_check, localize_path, get_platform
from platform_pulsar import get_platform
class Libtorrent: class Libtorrent:
magnetLink = None magnetLink = None
@ -76,9 +75,6 @@ class Libtorrent:
except Exception, e: except Exception, e:
log('Error importing from system. Exception: ' + str(e)) log('Error importing from 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]))
return return
if xbmcvfs.exists(torrentFile): if xbmcvfs.exists(torrentFile):

View File

@ -1966,7 +1966,6 @@ def check_network_advancedsettings():
log('UPDATE advancedsettings.xml disabled by user!') log('UPDATE advancedsettings.xml disabled by user!')
def get_download_dir(): def get_download_dir():
from platform_pulsar import get_platform
import tempfile import tempfile
platform = get_platform() platform = get_platform()
@ -2060,3 +2059,36 @@ def localize_path(path):
if not sys.platform.startswith('win'): if not sys.platform.startswith('win'):
path = path.encode(True and sys.getfilesystemencoding() or 'utf-8') path = path.encode(True and sys.getfilesystemencoding() or 'utf-8')
return path return path
def get_platform():
ret = {
"arch": sys.maxsize > 2 ** 32 and "x64" or "x86",
}
if xbmc.getCondVisibility("system.platform.android"):
ret["os"] = "android"
if "arm" in os.uname()[4] or "aarch64" in os.uname()[4]:
ret["arch"] = "arm"
elif xbmc.getCondVisibility("system.platform.linux"):
ret["os"] = "linux"
uname=os.uname()[4]
if "arm" in uname:
if "armv7" in uname:
ret["arch"] = "armv7"
elif "armv6" in uname:
ret["arch"] = "armv6"
else:
ret["arch"] = "arm"
elif "mips" in uname:
if sys.maxunicode > 65536:
ret["arch"] = 'mipsel_ucs4'
else:
ret["arch"] = 'mipsel_ucs2'
elif xbmc.getCondVisibility("system.platform.windows"):
ret["os"] = "windows"
elif xbmc.getCondVisibility("system.platform.osx"):
ret["os"] = "darwin"
elif xbmc.getCondVisibility("system.platform.ios"):
ret["os"] = "ios"
ret["arch"] = "arm"
return ret