forked from arvvoid/plugin.video.hbogoeu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
24 lines (18 loc) · 781 Bytes
/
main.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
# encoding: utf-8
# Copyright (C) 2019-2020 ArvVoid (https://github.com/arvvoid)
# SPDX-License-Identifier: GPL-2.0-or-later
#########################################################
from __future__ import absolute_import, division
import sys
from hbogolib.base import hbogo
from kodi_six import xbmc, xbmcaddon # type: ignore
# Setup plugin
PLUGIN_HANDLE = int(sys.argv[1])
BASE_URL = sys.argv[0]
# We use string slicing to trim the leading ? from the plugin call paramstring
REQUEST_PARAMS = sys.argv[2][1:]
if __name__ == '__main__':
add_on = xbmcaddon.Addon()
xbmc.log("[" + add_on.getAddonInfo('id') + "] STARTING VERSION: " + add_on.getAddonInfo('version'), xbmc.LOGDEBUG)
addon_main = hbogo(PLUGIN_HANDLE, BASE_URL)
addon_main.router(REQUEST_PARAMS)