Create addon submenu question
#1
Sorry for such a basic question, but I can't find much online about it or in other addons. Basically, how would I add a submenu to show for instance 'Pop', 'Rock', etc. after clicking on 'Music' with my current menu structure - obviously I've tried some variations on the below but none work (main menu does but obvs. 'Music' doesn't):

(Any help would be appreciated)

python:
@plugin.route('/')
def main_menu():
    """
    main menu 
    """
    items = [
    {
            'label': plugin.get_string(30010),
            'path': plugin.url_for('music'),
            'thumbnail': "image.jpg"},
    ]

    return items

@plugin.route('/music/')
def music():
    """
    contains playable podcasts listed as just-in
    """
    items = [
    {
            'label': plugin.get_string(30011), 
            'path': plugin.url_for('music/rock'),
            'thumbnail': "sample.jpg"},
    ]

@plugin.route('/music/rock')
def music_rock():
    """
    contains playable podcasts listed as just-in
    """
    soup = addon.get_soup(URL)
    
    playable_podcast = addon.get_playable_podcast(soup)
    
    items = addon.compile_playable_podcast(playable_podcast)

    return items
Reply

Logout Mark Read Team Forum Stats Members Help
Create addon submenu question0