-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathaddon.py
More file actions
50 lines (45 loc) · 1.04 KB
/
addon.py
File metadata and controls
50 lines (45 loc) · 1.04 KB
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
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Imports
#
from future import standard_library
standard_library.install_aliases()
from builtins import str
import os
import sys
import urllib.parse
import xbmc
import xbmcaddon
LIB_DIR = xbmc.translatePath(
os.path.join(xbmcaddon.Addon(id="plugin.video.roosterteeth").getAddonInfo('path'), 'resources', 'lib'))
sys.path.append(LIB_DIR)
# Parse parameters...
if len(sys.argv[2]) == 0:
#
# Main menu
#
import roosterteeth_main as plugin
else:
action = urllib.parse.parse_qs(urllib.parse.urlparse(sys.argv[2]).query)['action'][0]
#
# List
#
if action == 'list-episodes':
import roosterteeth_list_episodes as plugin
#
# List Series
#
if action == 'list-series':
import roosterteeth_list_series as plugin
#
# List Serie seasons
#
if action == 'list-serie-seasons':
import roosterteeth_list_serie_seasons as plugin
#
# Play
#
elif action == 'play':
import roosterteeth_play as plugin
plugin.Main()