forked from im85288/script.arctic.zephyr.helper.jarvis
/
default.py
50 lines (40 loc) · 971 Bytes
/
default.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import xbmcaddon
import xbmcplugin
import os
__settings__ = xbmcaddon.Addon(id='script.arctic.zephyr.helper.jarvis')
__cwd__ = __settings__.getAddonInfo('path')
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib' ) )
sys.path.append(BASE_RESOURCE_PATH)
import MainModule
#script init
action = ""
argument1 = ""
argument2 = ""
argument3 = ""
# get arguments
try:
action = str(sys.argv[1])
except:
pass
try:
argument1 = str(sys.argv[2])
except:
pass
try:
argument2 = str(sys.argv[3])
except:
pass
try:
argument3 = str(sys.argv[4])
except:
pass
if action == "COLORPICKER":
from ColorPicker import ColorPicker
colorPicker = ColorPicker("ColorPicker.xml", __cwd__, "default", "1080i")
colorPicker.skinString = argument1
colorPicker.doModal()
del colorPicker
elif action == "SETVIEW":
MainModule.setView()
elif action == "ENABLEVIEWS":
MainModule.enableViews()