mintsoft / kodi.plugin.ytchannels

kodi.plugin.ytchannels
GNU General Public License v3.0
6 stars 8 forks source link

The setting parameter "Show 'add folder/channels'" doesn't work correctly in Folder list #41

Closed jirkoun closed 1 year ago

jirkoun commented 1 year ago

Even if I have the "Show 'add folder/channels'" parameter set to 'false', the line "Add channel to " still appears in the Folder list.

I fixed (localy) this mismatch by being in the ytchannels.py module (in version 0.5.0+matrix.1) at line 209, instead of the original:

        url = build_url({'mode': 'add_channel', 'foldername': '%s'%foldername})
        li = xbmcgui.ListItem('[COLOR green]%s[/COLOR] [COLOR blue]%s[/COLOR]'%(local_string(30009),foldername))
        li.setArt({'icon':plus_img})
        xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li,isFolder=True)

added one line - so it's new:

    if show_adds !='false':
        url = build_url({'mode': 'add_channel', 'foldername': '%s'%foldername})
        li = xbmcgui.ListItem('[COLOR green]%s[/COLOR] [COLOR blue]%s[/COLOR]'%(local_string(30009),foldername))
        li.setArt({'icon':plus_img})
        xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li,isFolder=True)
mintsoft commented 1 year ago

Just confirmed this. The setting was only toggling the show/hide on the root folder. That fix above will work, I'll make that change in a sec

mintsoft commented 1 year ago

Fixed in 0.5.1; https://github.com/xbmc/repo-plugins/pull/4414