-
Notifications
You must be signed in to change notification settings - Fork 6
/
default.py
64 lines (55 loc) · 1.91 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import sys
from aussieaddonscommon import utils
from resources.lib import index
from resources.lib import play
from resources.lib import rounds
from resources.lib import stream_auth
from resources.lib import teams
from resources.lib import videos
import xbmcaddon
# Print our platform/version debugging information
utils.log_kodi_platform_version()
def main():
params_str = sys.argv[2]
params = utils.get_url(params_str)
utils.log('Loading with params: {0}'.format(params))
if len(params) == 0:
index.make_list()
elif 'category' in params:
if params['category'] == 'Settings':
xbmcaddon.Addon().openSettings()
elif params['category'] == 'Team Video':
teams.make_list()
elif params['category'] == 'All Match Replays':
index.make_seasons_list()
else:
videos.make_list(params)
elif 'season' in params:
rounds.make_rounds(params)
elif 'team' in params:
videos.make_list(params)
elif 'round_id' in params:
videos.make_list(params)
elif 'title' in params:
play.play(params_str)
elif 'action' in params:
if params['action'] == 'cleartoken':
stream_auth.clear_token()
elif params['action'] == 'sendreport':
utils.user_report()
elif params['action'] == 'iap_help':
stream_auth.iap_help()
elif params['action'] == 'open_ia_settings':
try:
import drmhelper
if drmhelper.check_inputstream(drm=False):
ia = drmhelper.get_addon()
ia.openSettings()
else:
utils.dialog_message(
"Can't open inputstream.adaptive settings")
except Exception:
utils.dialog_message(
"Can't open inputstream.adaptive settings")
if __name__ == "__main__":
main()