Example #1
0
def clear_cache(plugin):
    # Clear urlquick cache
    urlquick.cache_cleanup(-1)
    Script.notify(plugin.localize(30208),
                  plugin.localize(30203),
                  display_time=5000,
                  sound=True)
def clear_cache(plugin):
    # Callback function of clear cache setting button

    # Clear urlquick cache
    urlquick.cache_cleanup(-1)
    Script.notify(plugin.localize(30371), '')

    # Remove all tv guides
    dirs, files = xbmcvfs.listdir(Script.get_info('profile'))
    for fn in files:
        if '.xml' in fn and fn != 'settings.xml':
            Script.log('Remove xmltv file: {}'.format(fn))
            xbmcvfs.delete(os.path.join(Script.get_info('profile'), fn))
Example #3
0
def cleanup(plugin):
    urlquick.cache_cleanup(-1)
    Script.notify("Cache Cleaned", "")
Example #4
0
def cleanup(plugin):
    urlquick.cache_cleanup(-1)
    with PersistentDict("proxy_cache") as cache:
        cache.clear()
    Script.notify("Cache Cleaned", "")
Example #5
0
def clear_cache(plugin):
    # Callback function of clear cache setting button
    urlquick.cache_cleanup(-1)
    Script.notify(plugin.localize(30371), '')
Example #6
0
def test_cache_cleanup():
    with pytest.deprecated_call():
        urlquick.cache_cleanup()
Example #7
0
from resources.lib.utils import getTokenParams, getHeaders, isLoggedIn, login as ULogin, logout as ULogout, check_addon
from resources.lib.constants import GET_CHANNEL_URL, PLAY_EX_URL, EXTRA_CHANNELS, GENRE_MAP, LANG_MAP, FEATURED_SRC, CONFIG, CHANNELS_SRC, IMG_CATCHUP, PLAY_URL, IMG_PUBLIC, IMG_CATCHUP_SHOWS, CATCHUP_SRC, M3U_SRC, EPG_SRC

# additional imports
import urlquick
from urllib import urlencode
from binascii import hexlify
from pickle import dumps
import inputstreamhelper
import json
import os
import socket
from time import time, sleep
from datetime import datetime, timedelta, date

urlquick.cache_cleanup(-1)


# Root path of plugin
@Route.register
def root(plugin):
    yield Listitem.from_dict(
        **{
            "label": "Featured",
            "art": {
                "thumb": IMG_CATCHUP_SHOWS + "cms/TKSS_Carousal1.jpg",
                "icon": IMG_CATCHUP_SHOWS + "cms/TKSS_Carousal1.jpg",
                "fanart": IMG_CATCHUP_SHOWS + "cms/TKSS_Carousal1.jpg",
            },
            "callback": Route.ref("/resources/lib/main:show_featured")
        })