forked from Ahnz/plugin.video.xstream
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.py
More file actions
28 lines (26 loc) · 1.03 KB
/
default.py
File metadata and controls
28 lines (26 loc) · 1.03 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
# -*- coding: utf-8 -*-
from xstream import run
from os.path import join
from sys import path
import platform
from resources.lib import common
from resources.lib.tools import logger
_addonPath_ = common.addonPath
path.append(join(_addonPath_, 'resources', 'lib'))
path.append(join(_addonPath_, 'resources', 'lib', 'gui'))
path.append(join(_addonPath_, 'resources', 'lib', 'handler'))
path.append(join(_addonPath_, 'resources', 'art', 'sites'))
path.append(join(_addonPath_, 'sites'))
logger.info('*---- Running xStream, version %s ----*' % common.addon.getAddonInfo('version'))
logger.info('Python-Version: %s' % platform.python_version())
try:
run()
except Exception as e:
if str(e) == 'UserAborted':
logger.error('User aborted list creation')
else:
import traceback
import xbmcgui
logger.error(traceback.format_exc())
value = (str(e.__class__.__name__) + ' : ' + str(e), str(traceback.format_exc().splitlines()[-3].split('addons')[-1]))
dialog = xbmcgui.Dialog().ok('Error', str(value))