Пример #1
0
    plugintools.get_setting("debug") == "true")
HOSTERS_BLACKLIST = [
]  # ["filenuke", "divxstage", "streamclou", "xvidstage", "rapidvideo"]

if plugintools.get_setting("use_anonymizer_site") == "true":
    ANON_URL = 'http://anonymouse.org/cgi-bin/anon-www.cgi/'
    MAIN_URL = ANON_URL + 'http://www.movie4k.to/'
elif plugintools.get_setting("use_alternative_site_url") == "true":
    MAIN_URL = plugintools.get_setting("alternative_site_url")
    if MAIN_URL[-1] != '/':
        MAIN_URL += '/'
else:
    MAIN_URL = 'http://www.movie4k.to/'

if plugintools.get_setting('clear_cache') == 'true':
    plugin.clear_function_cache()
    plugintools.set_setting('clear_cache', 'false')
    plugintools.log("movie4k clear cache")


# Entry point
def run():
    plugintools.log("movie4k.run")

    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
Пример #2
0
plugintools.module_log_enabled = (plugintools.get_setting("debug")=="true")
plugintools.http_debug_log_enabled = (plugintools.get_setting("debug")=="true")
HOSTERS_BLACKLIST = [] # ["filenuke", "divxstage", "streamclou", "xvidstage", "rapidvideo"]

if plugintools.get_setting("use_anonymizer_site")=="true":
    ANON_URL = 'http://anonymouse.org/cgi-bin/anon-www.cgi/'
    MAIN_URL = ANON_URL + 'http://www.movie4k.to/'
elif plugintools.get_setting("use_alternative_site_url")=="true":
    MAIN_URL = plugintools.get_setting("alternative_site_url")
    if MAIN_URL[-1] != '/':
        MAIN_URL += '/'
else:
    MAIN_URL = 'http://www.movie4k.to/'

if plugintools.get_setting('clear_cache') == 'true':
    plugin.clear_function_cache()
    plugintools.set_setting('clear_cache', 'false')
    plugintools.log("movie4k clear cache")

# Entry point
def run():
    plugintools.log("movie4k.run")

    # Get params
    params = plugintools.get_params()

    if params.get("action") is None:
        main_list(params)
    else:
        action = params.get("action")
        exec action+"(params)"
Пример #3
0
    audio['artist'] = artist.decode('utf8')
    audio['performer'] = artist.decode('utf8')
    audio['genre'] = genre.decode('utf8')
    audio['date'] = year.decode('utf8')
    audio['tracknumber'] = no.decode('utf8')
    audio.save(fname,v2_version=3)

def get_cached(func, *args, **kwargs):
    '''Return the result of func with the given args and kwargs
    from cache or execute it if needed'''
    @plugin.cached(kwargs.pop('TTL', 1440))
    def wrap(func_name, *args, **kwargs):
        return func(*args, **kwargs)
    return wrap(func.__name__, *args, **kwargs)

def _(string_id):
    if string_id in STRINGS:
        return plugin.get_string(STRINGS[string_id]).encode('utf8')
    else:
        __log('String is missing: %s' % string_id)
        return string_id

if __name__ == '__main__':
    if usecostum:
        dst = plugin.get_setting("music_dir")
    else:
        dst = os.path.expanduser('~/music/')
    if not extra_info: plugin.clear_function_cache()
#    __log ('sort metoden : {0}'.format(dir(xbmcswift2.SortMethod)))
    plugin.run()