コード例 #1
0
ファイル: live.py プロジェクト: vphuc81/MyRepository
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
ファイル: live.py プロジェクト: jorritsmit/Mr-Blamo-Repo
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)