コード例 #1
0
def run(path, includePlay):
    import xbmcgui
    if xbmcgui.Window(10000).getProperty('Super_Favourites_Chooser') == 'true':
        return

    import xbmc
    import chooser
    
    if not chooser.GetFave('SF_QL', path=path, includePlay=includePlay):
        return False
    
    path = xbmc.getInfoLabel('Skin.String(SF_QL.Path)')

    if len(path) == 0 or path == 'noop':
        return

    toTest = path.replace(',return', '').lower()

    if toTest.startswith('activatewindow') and ',' in toTest: #i.e. NOT like ActivateWindow(filemanager)
        if not toTest.startswith('activatewindow(10003'): #Filemanager
            xbmc.executebuiltin(path)
            return

    #remove any spurious SF stuff, e.g.
    #ActivateWindow("weather?content_type=Chooser&sf_options=desc%3DShow%2520Weather%26_options_sf",return) needs to be
    #ActivateWindow(weather)
    path = path.replace('content_type=Chooser&', '')
    path = path.split('?sf_options')[0]
    path = path.replace('"',      '')
    path = path.replace('"', '')
    if not path.endswith(')'):
        path += ')'

    import player
    player.playCommand(path, contentMode=True) #content mode means we are not actually in SF at the moment
コード例 #2
0
def quickLaunch():
    import chooser
    if not chooser.GetFave('SF_QL'):
        return False

    path = xbmc.getInfoLabel('Skin.String(SF_QL.Path)')

    if len(path) == 0 or path == 'noop':
        return

    if path.lower().startswith('activatewindow') and ',' in path: #i.e. NOT like ActivateWindow(filemanager)
        xbmc.executebuiltin(path)
        return

    import player
    player.playCommand(path)
コード例 #3
0
ファイル: capture.py プロジェクト: NEOhidra/spoyser-repo
def quickLaunch():
    import chooser
    if not chooser.GetFave('SF_QL'):
        return False

    path = xbmc.getInfoLabel('Skin.String(SF_QL.Path)')

    if len(path) == 0 or path == 'noop':
        return

    if path.lower().startswith('activatewindow') and ',' in path: #i.e. NOT like ActivateWindow(filemanager)
        xbmc.executebuiltin(path)
        return

    import player
    player.playCommand(path)
コード例 #4
0
def run(path, includePlay):
    import xbmcgui
    if xbmcgui.Window(10000).getProperty('Super_Favourites_Chooser') == 'true':
        return

    import xbmc
    import chooser

    if not chooser.GetFave('SF_QL', path=path, includePlay=includePlay):
        return False

    path = xbmc.getInfoLabel('Skin.String(SF_QL.Path)')

    if len(path) == 0 or path == 'noop':
        return

    toTest = path.replace(',return', '').lower()

    if toTest.startswith(
            'activatewindow'
    ) and ',' in toTest:  #i.e. NOT like ActivateWindow(filemanager)
        if not toTest.startswith('activatewindow(10003'):  #Filemanager
            xbmc.executebuiltin(path)
            return

    #remove any spurious SF stuff, e.g.
    #ActivateWindow("weather?content_type=Chooser&sf_options=desc%3DShow%2520Weather%26_options_sf",return) needs to be
    #ActivateWindow(weather)
    path = path.replace('content_type=Chooser&', '')
    path = path.split('?sf_options')[0]
    path = path.replace('"', '')
    path = path.replace('"', '')
    if not path.endswith(')'):
        path += ')'

    contentMode = True
    if path.lower().startswith('executebuiltin'):
        contentMode = False

    import player
    player.playCommand(path, contentMode=contentMode)
コード例 #5
0
ファイル: ott.py プロジェクト: billymcintosh/script.ontappgpl
def onParams(application, _params):
    global APPLICATION
    APPLICATION = application

    params = get_params(_params)
    mode = None

    try:
        mode = int(params['mode'])
    except:
        pass

    try:
        url = params['url']
    except:
        url = None

    refresh = False

    if mode == _SCRIPT:
        cmd = 'RunScript(%s)' % url
        xbmc.executebuiltin(cmd)

    elif mode == _ADDON:
        xbmc.executebuiltin('ActivateWindow(%d,"plugin://%s/",return)' %
                            (WINDOWID, url))

    elif mode == _SUPERFAVE:
        try:
            import player
            player.playCommand(url)
        except:
            pass

    elif mode == _REMOVESUPERFAVE:
        refresh = RemoveSFShortcut(SFFILE, url)

    elif mode == _REMOVESFMOVIE:
        refresh = RemoveSFShortcut(SFMOV, url)

    elif mode == _REMOVESFTV:
        refresh = RemoveSFShortcut(SFTV, url)

    elif mode == _MOVIE:
        xbmc.executebuiltin('ActivateWindow(10025,videodb://1/2,return)')

    elif mode == _TV:
        xbmc.executebuiltin('ActivateWindow(10025,videodb://2/2,return)')

    elif mode == _MOVIEOPTIONS:
        refresh = AddVideoOptions('MOVIE', SFMOV)

    elif mode == _TVOPTIONS:
        refresh = AddVideoOptions('TV', SFTV)

    elif mode == _MOVIEADDON:
        refresh = AddVideo('MOVIE')

    elif mode == _TVADDON:
        refresh = AddVideo('TV')

    elif mode == _CATEGORIES:
        ShowCategories(categoriesList)

    elif mode == _SETTINGS:
        ShowSettings()

    elif mode == _INI:
        cmd = 'XBMC.RunScript(special://home/addons/script.tvguidedixie/getIni.py)'
        xbmc.executebuiltin(cmd)

    elif mode == _CHANNELS:
        xbmc.executebuiltin('ActivateWindow(%d,"plugin://%s/?mode=%d")' %
                            (WINDOWID, TOOLS, 1900))

    elif mode == _SKINS:
        xbmc.executebuiltin('ActivateWindow(%d,"plugin://%s/?mode=%d")' %
                            (WINDOWID, TOOLS, 2000))

    elif mode == _LOGOS:
        xbmc.executebuiltin('ActivateWindow(%d,"plugin://%s/?mode=%d")' %
                            (WINDOWID, TOOLS, 2100))

    elif mode == _TOOLS:
        ShowTools()

    elif mode == _YOUTUBE:
        PlayYT(url)

    elif mode == _VPNICITY:
        SelectVPNicity(url)

    elif mode == _CATCHUP:
        ShowCatchup()

    elif mode == _SUPERSEARCH:
        SelectSuperSearch(url)

    elif mode == _SHOWSHORTCUTS:
        ShowShortcuts()

    elif mode == _ADDSHORTCUT:
        refresh = AddShortcut()

    elif mode == _REMOVESHORTCUT:
        refresh = RemoveShortcut(url)

    elif mode == _REMOVEMOVIE:
        refresh = RemoveVideo(url, 'MOVIE')

    elif mode == _REMOVETV:
        refresh = RemoveVideo(url, 'TV')

    else:
        Main()

    if refresh:
        APPLICATION.containerRefresh()