Ejemplo n.º 1
0
def mylist_del(video_type, content_id):
    """ Remove an item from "My List" """
    from resources.lib.modules.catalog import Catalog
    Catalog().mylist_del(video_type, content_id)

    from resources.lib.modules.library import Library
    Library().mylist_removed(video_type, content_id)
Ejemplo n.º 2
0
def mylist_add(video_type, content_id):
    """ Add an item to "My List" """
    from resources.lib.modules.catalog import Catalog
    Catalog().mylist_add(video_type, content_id)

    from resources.lib.modules.library import Library
    Library().mylist_added(video_type, content_id)
Ejemplo n.º 3
0
def library_movies():
    """ Show a list of all movies for integration into the Kodi Library """
    from resources.lib.modules.library import Library

    # Library seems to have issues with folder mode
    movie = routing.args.get('movie', [])[0] if routing.args.get('movie') else None

    if 'check_exists' in routing.args.get('kodi_action', []):
        Library().check_library_movie(movie)
        return

    if 'refresh_info' in routing.args.get('kodi_action', []):
        Library().show_library_movies(movie)
        return

    if movie:
        play('movies', movie)
    else:
        Library().show_library_movies()
Ejemplo n.º 4
0
def library_tvshows():
    """ Show a list of all tv series for integration into the Kodi Library """
    from resources.lib.modules.library import Library

    # Library seems to have issues with folder mode
    program = routing.args.get('program', [])[0] if routing.args.get('program') else None
    episode = routing.args.get('episode', [])[0] if routing.args.get('episode') else None

    if 'check_exists' in routing.args.get('kodi_action', []):
        Library().check_library_tvshow(program)
        return

    if 'refresh_info' in routing.args.get('kodi_action', []):
        Library().show_library_tvshows(program)
        return

    if episode:
        play('episodes', episode)
    elif program:
        Library().show_library_tvshows_program(program)
    else:
        Library().show_library_tvshows()
Ejemplo n.º 5
0
def library_clean():
    """ Clean the library. """
    from resources.lib.modules.library import Library
    Library().clean()
Ejemplo n.º 6
0
def library_update():
    """ Refresh the library. """
    from resources.lib.modules.library import Library
    Library().update()
Ejemplo n.º 7
0
def library_configure():
    """ Show information on how to enable the library integration """
    from resources.lib.modules.library import Library
    Library().configure()