예제 #1
0
    Add_Dir(name="DEF CON 21 (2013)",
            url=BASE + YOUTUBE_CHANNEL_ID_6 + "/",
            folder=True,
            icon="https://www.defcon.org/images/defcon-21/dc-21-logo-sm.png")

    Add_Dir(name="DEF CON 20 (2012)",
            url=BASE + YOUTUBE_CHANNEL_ID_8 + "/",
            folder=True,
            icon="https://www.defcon.org/images/defcon-20/dc20-logo_smsq.png")

    Add_Dir(name="DEF CON 20 Documentary",
            url=BASE + YOUTUBE_CHANNEL_ID_7 + "/",
            folder=True,
            icon="https://www.defcon.org/images/defcon-20/dc20-logo_smsq.png")


@route(mode='koding_settings')
def Koding_Settings():
    Open_Settings()


@route(mode='simple_dialog', args=['title', 'msg'])
def Simple_Dialog(title, msg):
    OK_Dialog(title, msg)


if __name__ == "__main__":
    Run(default='main_menu')
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
예제 #2
0
# If the item returned is a dictionary that's great we know we have a list to work with
    if koding.Data_Type(content) == 'dict':
        xbmc.log(repr(content), 2)
        playback = koding.Play_Video(video=content["url"], showbusy=True)

# It may be a plugin or direct url has been sent through, if so lets use the list_type variable
    elif not list_type.endswith('_dialog'):
        playback = koding.Play_Video(video=list_type, showbusy=True)

# Nothing useful has been found, lets exit back to the list
    else:
        return

# If the playback returned as True then it was successful but if it was False we know we need to try again for another source
    if not playback:
        if dialog.yesno(
                'PLAYBACK FAILED',
                'The video may have been removed, the web host may have altered their code or this video may not be available in your region. [COLOR=dodgerblue]Would you like to try another source?[/COLOR]'
        ):
            Scrape_Sites(list_type)


#----------------------------------------------------------------
"""
    SECTION 7:
    Essential if creating list items, this tells kodi we're done creating our list items.
    The list will not populate without this
"""
Run()
xbmcplugin.endOfDirectory(int(sys.argv[1]))
예제 #3
0
파일: default.py 프로젝트: brianf715/voa
# If the item returned is a dictionary that's great we know we have a list to work with
    if koding.Data_Type(content) == 'dict':
        xbmc.log(repr(content),2)
        playback = koding.Play_Video(video=content["url"], showbusy=True)
 
# It may be a plugin or direct url has been sent through, if so lets use the list_type variable
    elif not list_type.endswith('_dialog'):
        playback = koding.Play_Video(video=list_type, showbusy=True)

# Nothing useful has been found, lets exit back to the list
    else:
        return

# If the playback returned as True then it was successful but if it was False we know we need to try again for another source
    if not playback:
        if dialog.yesno('PLAYBACK FAILED','The video may have been removed, the web host may have altered their code or this video may not be available in your region. [COLOR=dodgerblue]Would you like to try another source?[/COLOR]'):
            Scrape_Sites(list_type)

#----------------------------------------------------------------

"""
    SECTION 6:
    Essential if creating list items, this tells kodi we're done creating our list items.
    The list will not populate without this. In the run command you need to set default to
    whatever route you want to open into, in this example the 'main' route which opens the
    Main_Menu() function up at the top.
"""
if __name__ == "__main__":
    Run(default='main')
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
예제 #4
0
            if not Play_Video(url[choice]):
                OK_Dialog('PLAYBACK FAILED',
                          'This stream is currently offline.')
                Play_Link(url)


#----------------------------------------------------------------
# A basic OK Dialog
@route(mode='koding_settings')
def Koding_Settings():
    Open_Settings()


#----------------------------------------------------------------
# A basic OK Dialog
@route(mode='simple_dialog', args=['title', 'msg'])
def Simple_Dialog(title, msg):
    OK_Dialog(title, msg)


#----------------------------------------------------------------
"""
    SECTION 6:
    Essential if creating list items, this tells kodi we're done creating our list items.
    The list will not populate without this. In the run command you need to set default to
    whatever route you want to open into, in this example the 'start' route which opens the
    Start() function up at the top.
"""
if __name__ == "__main__":
    Run(default='start')
    xbmcplugin.endOfDirectory(int(sys.argv[1]))
예제 #5
0
def Chopin_Menu():
    #(name="Concertos 1 and 2, Trifanov-Pletnev, added Dec 17", url=BASE3+YOUTUBE_CHANNEL_ID_134, folder=False,mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)

@route(mode='berlioz_menu')
def Berlioz_Menu():
    Add_Dir(name="Romeo and Juliette, RFO, added Dec 17", url=BASE3+YOUTUBE_CHANNEL_ID_135, folder=False,mode='play_yt',)
    Add_Dir(name="Symphonie Fantastiqes, Estrada, Added Dec 17", url=BASE3+YOUTUBE_CHANNEL_ID_136, folder=False,mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)

@route(mode='nielsen_menu')
def Nielsen_Menu():
    Add_Dir(name="Soundtracks only - Symphonies 1 to 6", url=BASE+YOUTUBE_CHANNEL_ID_8+"/", folder=True,)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)


@route(mode='benjamin_britten_menu')
def Benjamin_Britten_Menu():
    Add_Dir(name="War Requiem, German Orchestra", url=BASE3+YOUTUBE_CHANNEL_ID_106, folder=False, mode='play_yt',)
    Add_Dir(name="War Requiem, Marin Alsop", url=BASE3+YOUTUBE_CHANNEL_ID_107, folder=False, mode='play_yt',)
    Add_Dir(name="Piano Concerto, BBC Proms", url=BASE3+YOUTUBE_CHANNEL_ID_108, folder=False, mode='play_yt',)
    Add_Dir(name="A Ceremony of Carols, St Jacobs Vokalensemble", url=BASE3+YOUTUBE_CHANNEL_ID_109, folder=False, mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)


@route(mode='ravel_menu')
def Ravel_Menu():
    Add_Dir(name="Bolero, Gergiev, London Symphony Orchestra", url=BASE3+YOUTUBE_CHANNEL_ID_71, folder=False, mode='play_yt',)
    Add_Dir(name="Piano Concerto No 6 in G Major, Yuja Wang, Camerata Salzburg", url=BASE3+YOUTUBE_CHANNEL_ID_95, folder=False,mode='play_yt',)
    Add_Dir(name="Piano Concerto in G Major, Argerich,La Scala 2016, added May 18", url=BASE3+YOUTUBE_CHANNEL_ID_190, folder=False,mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)



@route(mode='baroque_menu')
def Baroque_Menu():
    Add_Dir(name="Baroque Music ", url=BASE+YOUTUBE_CHANNEL_ID_14+"/", folder=True,)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)
    #Add_Dir(name="", url=BASE3+YOUTUBE_CHANNEL_ID_, folder=False,mode='play_yt',)


@route(mode='compilations_menu')
def Compilations_Menu():
    Add_Dir(name="XMAS in Vienna 2015, Ortner, added Dec 17",url=BASE3+YOUTUBE_CHANNEL_ID_137, folder=False,mode='play_yt',)
    Add_Dir(name="XMAS in Vienna 2016, Ortner, added Dec 17",url=BASE3+YOUTUBE_CHANNEL_ID_138, folder=False,mode='play_yt',)
    Add_Dir(name="XMAS in Vienna 2008, Chichon, added Dec 17",url=BASE3+YOUTUBE_CHANNEL_ID_139, folder=False,mode='play_yt',)
    Add_Dir(name="XMAS in Vienna 1999, The Three Tenors, added Dec 17",url=BASE3+YOUTUBE_CHANNEL_ID_140, folder=False,mode='play_yt',)




#----------------------------------------------------------------
# A basic OK Dialog
@route(mode='koding_settings')
def Koding_Settings():
    Open_Settings()
#----------------------------------------------------------------
# A basic OK Dialog
@route(mode='simple_dialog', args=['title','msg'])
def Simple_Dialog(title,msg):
    OK_Dialog(title, msg)
#----------------------------------------------------------------
# Play a youtube video
@route(mode='play_yt', args=['url'])
def Play_YT(url):
    xbmc.executebuiltin('PlayMedia(plugin://plugin.video.youtube/%s)'%url)       

    """
    SECTION 6:
    Essential if creating list items, this tells kodi we're done creating our list items.
    The list will not populate without this. In the run command you need to set default to
    whatever route you want to open into, in this example the 'main_menu' route which opens the
    Main_Menu() function up at the top.
"""
if __name__ == "__main__":
    Run(default='main_menu')
    xbmcplugin.endOfDirectory(int(sys.argv[1]))