forked from aussieaddons/plugin.video.abc_iview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.py
47 lines (41 loc) · 1.52 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
#
# ABC iView XBMC Addon
# Copyright (C) 2012 Andy Botting
#
# This plugin includes code from python-iview
# Copyright (C) 2009-2012 by Jeremy Visser <[email protected]>
#
# This plugin is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This plugin is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this plugin. If not, see <http://www.gnu.org/licenses/>.
#
import os, sys
# Add our resources/lib to the python path
try:
current_dir = os.path.dirname(os.path.abspath(__file__))
except:
current_dir = os.getcwd()
sys.path.append(os.path.join(current_dir, 'resources', 'lib'))
import utils, categories, series, programs, play
# Print our platform/version debugging information
utils.log_xbmc_platform_version()
if __name__ == "__main__" :
params_str = sys.argv[2]
params = utils.get_url(params_str)
if (len(params) == 0):
categories.make_category_list()
elif params.has_key("play"):
play.play(params_str)
elif params.has_key("series"):
programs.make_programs_list(params_str)
elif params.has_key("category"):
series.make_series_list(params_str)