from resources.lib.base.exceptions import Error from resources.lib.base.log import log from resources.lib.base.util import check_key, convert_datetime_timezone, create_playlist, date_to_nl_dag, date_to_nl_maand, get_credentials, load_file, load_prefs, load_profile, load_tests, query_epg, query_settings, set_credentials, write_file from resources.lib.language import _ try: unicode except NameError: unicode = str try: from sqlite3 import dbapi2 as sqlite except: from pysqlite2 import dbapi2 as sqlite api = API() api._abortRequested = False backend = '' @plugin.route('') def home(**kwargs): profile_settings = load_profile(profile_id=1) if profile_settings['first_boot'] == 1: first_boot() folder = plugin.Folder() if len(profile_settings['pswd']) > 0 and len(profile_settings['devicekey']) > 0: folder.add_item(label=_(_.LIVE_TV, _bold=True), path=plugin.url_for(func_or_url=live_tv)) folder.add_item(label=_(_.CHANNELS, _bold=True), path=plugin.url_for(func_or_url=replaytv))
import time, xbmc, xbmcaddon from resources.lib.api import API from resources.lib.base import settings from resources.lib.base.constants import ADDON_PROFILE from resources.lib.base.util import change_icon, check_iptv_link, clear_cache, download_files, find_free_port, get_system_arch from resources.lib.proxy import HTTPMonitor, RemoteControlBrowserService from resources.lib.util import update_api_url, update_img_size, update_os_browser api = API() def daily(): update_os_browser() update_api_url() update_img_size() check_iptv_link() clear_cache() def hourly(type=0): if type < 2: download_files() if type > 0: if api.test_channels(tested=False) < 5: api.test_channels(tested=True) def startup(): settings.setBool(key='_test_running', value=False) system, arch = get_system_arch() settings.set(key="_system", value=system) settings.set(key="_arch", value=arch)