delete pulsar
parent
c08f0c3b0e
commit
5879013616
1161
.idea/workspace.xml
1161
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
|
@ -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):
|
||||||
|
|
36
functions.py
36
functions.py
|
@ -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()
|
||||||
|
|
||||||
|
@ -2059,4 +2058,37 @@ def localize_path(path):
|
||||||
if not isinstance(path, unicode): path = path.decode(chardet.detect(path)['encoding'])
|
if not isinstance(path, unicode): path = path.decode(chardet.detect(path)['encoding'])
|
||||||
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
|
Loading…
Reference in New Issue