Popup with two paths or parameters
#1
Help please,I'm working on a new project and I'm a beginner and I do not know how i create a popup window with two choices "trailer" and "full movie" and if i click on trailer, he will read it from his folder "trailer", otherwise if i click on full movie he will read it from his full movie folder. my problem is basically how I get the full movie of a trailer clicked.
this is the part of the code

python:
#the path of the trailer folder
VIDEOS = {'Horror': [{'name': 'Jigsaw',
                       'thumb': 'C:/Users/renaud-consulting/AppData/Roaming/Kodi/userdata/playlists/video/Horror/icon.jpg',
                       'video': 'C:/Users/renaud-consulting/AppData/Roaming/Kodi/userdata/playlists/video/Horror/jigsaw.mp4',
                       'genre': 'Horror'},

def router(paramstring):
    """
    Router function that calls other functions
    depending on the provided paramstring
    :param paramstring: URL encoded plugin paramstring
    :type paramstring: str
    """
    # Parse a URL-encoded paramstring to the dictionary of
    # {<parameter>: <value>} elements
    params = dict(parse_qsl(paramstring))
    # Check the parameters passed to the plugin
    if params:
        if params['action'] == 'listing':
            # Display the list of videos in a provided category.
            list_videos(params['category'])
        elif params['action'] == 'play':
            yesnowindow = xbmcgui.Dialog().yesno('kodi',line,yeslabel='Film',nolabel='Trailer')
            if yesnowindow:
                #Missing code to play the the full movie from his folder               
            else:
                play_video(params['video']) #Playing the trailer clicked

there is anyone who can help me please??
Reply
#2
I'm not sure what your problem is and I hate to state the obvious, but to play a movie you need to provide a path/URL for that movie.
Reply

Logout Mark Read Team Forum Stats Members Help
Popup with two paths or parameters0