forked from SchapplM/xbmc-addon-service-watchedlist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.py
31 lines (26 loc) · 1.01 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
"""
This file is entry point for automatic start via Kodi
"""
import sys
import xbmc
import lib.watchedlist.utils as utils
from lib.watchedlist.watchedlist import WatchedList
__remotedebug__ = False
# Append pydev remote debugger
if __remotedebug__:
utils.log("Initialize remote debugging.")
# Make pydev debugger works for auto reload.
try:
import pydevd
pydevd.settrace('localhost', port=60678, stdoutToServer=True, stderrToServer=True)
except ImportError:
sys.stderr.write("Error: " +
"You must add org.python.pydev.debug.pysrc to your PYTHONPATH.")
utils.showNotification('WatchedList Error', 'remote debug could not be imported.', xbmc.LOGERROR)
sys.exit(1)
except BaseException:
utils.showNotification('WatchedList Error', 'remote debug in pydev is activated, but remote server not responding.', xbmc.LOGERROR)
sys.exit(1)
# Run the program
utils.log("WatchedList Database Service starting...")
WatchedList().runProgram()