forked from kodiondemand/addon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.py
30 lines (21 loc) · 1.1 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
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# XBMC entry point
# ------------------------------------------------------------
import os
import sys
import xbmc
from platformcode import config, logger
logger.info("init...")
if os.path.isfile(os.path.join(config.get_data_path(), 'alfavorites-default.json')) == True and os.path.isfile(os.path.join(config.get_data_path(), 'kodfavorites-default.json')) == False:
os.rename(os.path.join(config.get_data_path(), 'alfavorites-default.json'), os.path.join(config.get_data_path(), 'kodfavorites-default.json'))
if os.path.isfile(os.path.join(config.get_data_path(), 'alfa_db.sqlite')) == True and os.path.isfile(os.path.join(config.get_data_path(), 'kod_db.sqlite')) == False:
os.rename(os.path.join(config.get_data_path(), 'alfa_db.sqlite'), os.path.join(config.get_data_path(), 'kod_db.sqlite'))
librerias = xbmc.translatePath(os.path.join(config.get_runtime_path(), 'lib'))
sys.path.append(librerias)
from platformcode import launcher
if sys.argv[2] == "":
launcher.start()
launcher.run()
else:
launcher.run()