Пример #1
0
        addon_able.set_enabled("inputstream.adaptive")
    except:
        pass
    time.sleep(0.5)
    try:
        addon_able.set_enabled("inputstream.rtmp")
    except:
        pass
    time.sleep(0.5)
    xbmc.executebuiltin("XBMC.UpdateLocalAddons()")
    kodi.set_setting('set_rtmp', 'true')
    time.sleep(0.5)

# ################################################## ##
run_once_path = xbmc.translatePath(os.path.join('special://home', 'addons', addon_id, 'resources', 'run_once.py'))
if kodi.get_var(run_once_path, 'hasran') == 'false':
    kodi.set_setting('sevicehasran', 'false')

# Start of notifications
if kodi.get_setting('sevicehasran') == 'true':
    TypeOfMessage = "t"
    notification.check_news2(TypeOfMessage, override_service=False)
# ################################################## ##


if __name__ == '__main__':
    monitor = xbmc.Monitor()
    while not monitor.abortRequested():
        # Sleep/wait for abort for 10 seconds 12 hours is 43200   1 hours is 3600
        if monitor.waitForAbort(1800):
            # Abort was requested while waiting. We should exit
Пример #2
0
        addon_able.set_enabled("inputstream.adaptive")
    except:
        pass
    time.sleep(0.5)
    try:
        addon_able.set_enabled("inputstream.rtmp")
    except:
        pass
    time.sleep(0.5)
    xbmc.executebuiltin("XBMC.UpdateLocalAddons()")
    kodi.set_setting('set_rtmp', 'true')
    time.sleep(0.5)

# ################################################## ##
run_once_path = xbmc.translatePath(os.path.join('special://home', 'addons', addon_id, 'resources', 'run_once.py'))
if kodi.get_var(run_once_path, 'hasran') == 'false':
    kodi.set_setting('sevicehasran', 'false')

# Start of notifications
if kodi.get_setting('sevicehasran') == 'true':
    TypeOfMessage = "t"
    notification.check_news2(TypeOfMessage, override_service=False)
# ################################################## ##


if __name__ == '__main__':
    monitor = xbmc.Monitor()
    while not monitor.abortRequested():
        # Sleep/wait for abort for 10 seconds 12 hours is 43200   1 hours is 3600
        if monitor.waitForAbort(1800):
            # Abort was requested while waiting. We should exit
Пример #3
0
date = datetime.datetime.today().weekday()
maintool.auto_clean(True) if kodi.get_setting("acstartup") == "true" or (
    kodi.get_setting("clearday") == date) else ''

if kodi.get_setting('set_rtmp') == 'false':
    addon_able.set_enabled("inputstream.adaptive")
    time.sleep(0.5)
    addon_able.set_enabled("inputstream.rtmp")
    time.sleep(0.5)
    kodi.set_setting('set_rtmp', 'true')
    xbmc.executebuiltin("UpdateLocalAddons()")
    time.sleep(0.5)

note_time = datetime.datetime.now()
kodi.set_setting('sevicehasran', 'false') if kodi.get_var(
    run_once_path, 'hasran') == 'false' else ''
if kodi.get_setting('sevicehasran') == 'true':
    note_time = note(note_time, False)

if __name__ == '__main__':
    monitor = xbmc.Monitor()
    while not monitor.abortRequested():
        if kodi.get_setting('scriptblock') == 'true':
            block_time = blocker(block_time)
        if not os.path.exists(addonspath + addon_id):
            get_dir(addon_id, script_url)
        if datetime.datetime.now() >= note_time + datetime.timedelta(hours=6) \
                and kodi.get_setting('sevicehasran') == 'true':
            note_time = note(note_time, True)
        if kodi.get_setting('sevicehasran') == 'false':
            for line in fileinput.input(run_once_path, inplace=1):
Пример #4
0
        addon_able.set_enabled("inputstream.rtmp")
    except Exception as e:
        kodi.log(e)
    time.sleep(0.5)
    # xbmc.executebuiltin("XBMC.UpdateLocalAddons()")
    kodi.set_setting('set_rtmp', 'true')
    time.sleep(0.5)

# ################################################## ##
run_once_path = xbmc.translatePath(
    os.path.join('special://home', 'addons', addon_id, 'resources',
                 'run_once.py'))
if not os.path.isfile(run_once_path) or not open(run_once_path, 'rb').read():
    with open(run_once_path, 'wb') as path:
        path.write("hasran = 'false'")
if kodi.get_var(run_once_path, 'hasran') != 'true':
    kodi.set_setting('sevicehasran', 'false')
# Start of notifications
if kodi.get_setting('sevicehasran') == 'true':
    TypeOfMessage = "t"
    notification.check_news2(TypeOfMessage, override_service=False)
# ################################################## ##

if __name__ == '__main__':
    monitor = xbmc.Monitor()
    while not monitor.abortRequested():
        # Sleep/wait for abort for 10 seconds 12 hours is 43200   1 hours is 3600
        if monitor.waitForAbort(1800):
            # Abort was requested while waiting. We should exit
            kodi.log('CLOSING ' + AddonTitle.upper() + ' SERVICES')
            break