-
Notifications
You must be signed in to change notification settings - Fork 3
/
addon.py
44 lines (41 loc) · 1.37 KB
/
addon.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
import resources.lib.util as util
try:
if 'vf' in util.pluginArgs:
vf = util.pluginArgs['vf']
if vf == 'shows':
import resources.lib.shows as shows
shows.menu()
elif vf == 'upcoming':
import resources.lib.upcoming as upcoming
upcoming.menu()
elif vf == 'history':
import resources.lib.history as history
history.menu()
elif vf == 'backlog':
import resources.lib.backlog as backlog
backlog.menu()
elif vf == 'failed':
import resources.lib.failed as failed
failed.menu()
elif vf == 'seasons':
import resources.lib.seasons as seasons
seasons.menu()
elif vf == 'episodes':
import resources.lib.episodes as episodes
episodes.menu()
else:
util.log('invalid folder "' + vf + '"')
import resources.lib.main as main
main.menu()
elif 'action' in util.pluginArgs:
action = util.pluginArgs['action']
if action == 'showAdd':
import resources.lib.showAdd as showAdd
showAdd.action()
else:
util.log('invalid action "' + action + '"')
else:
import resources.lib.main as main
main.menu()
except IOError as ioe:
util.message('Error', '%s' % ioe)