예제 #1
0
def live_add_to_library(channel, mode):
    if mode != None and plugin.get_setting(SETTING_LIVE_DEFAULT_AUTO_ADD, bool):
        player = mode
    else:
        players = active_players("live", filters = {'network': channel.get('network')})
        players.insert(0, ADDON_SELECTOR)
        selection = dialogs.select(_("Play using..."), [p.title for p in players])
        if selection == -1:
            return
        player = players[selection]
    library_folder = setup_library(plugin.get_setting(SETTING_LIVE_LIBRARY_FOLDER, unicode))
    add_channel_to_library(library_folder, channel, player)
예제 #2
0
def live_add_to_library(channel, mode):
    if mode != None and plugin.get_setting(SETTING_LIVE_DEFAULT_AUTO_ADD, bool):
        player = mode
    else:
        players = active_players("live", filters = {'network': channel.get('network')})
        players.insert(0, ADDON_SELECTOR)
        selection = dialogs.select(_("Play using..."), [p.title for p in players])
        if selection == -1:
            return
        player = players[selection]
    library_folder = setup_library(plugin.get_setting(SETTING_LIVE_LIBRARY_FOLDER, unicode))
    add_channel_to_library(library_folder, channel, player)