separate pages application
#1
separate pages application

import xbmcgui
import xbmcplugin
import sys
addon_handle = int(sys.argv[1])
xbmcplugin.addDirectoryItem(handle=addon_handle, url="plugin://plugin.video.ccv3/pagina1.py
", listitem=xbmcgui.ListItem("pagina1.py
"), isFolder=True)
xbmcplugin.endOfDirectory(addon_handle)



separate pages application
 
I want to make a video application but in separate pages, for more order
instead of doing one and that with the parameters show me different things
but I do not know how to change from one page to another
for example
index.py
page1.py
page2.py


I do this but it does not work
this in index
Reply
#2
see our wiki tutorial: https://kodi.wiki/view/Audio/video_add-on_tutorial
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
if I had already seen that, but I want to do it in separate scripts index.py page1.py I do not know how to go from index.py to page1.py there they show with parameters and everything is interpreted within the same script
Reply
#4
if you want to split your code into several modules, you need to import those modules in you main .py file.

(2018-03-02, 21:21)porkeno Wrote: xbmcplugin.addDirectoryItem(handle=addon_handle, url="plugin://plugin.video.ccv3/pagina1.py
", listitem=xbmcgui.ListItem("pagina1.py
"), isFolder=True)
 
nope, it doesn't work like that (at all) ;-)
you can import and use a function from another .py file, something like:

python:
import pagina1

url = pagina1.url()
li = pagina1.li()
xbmcplugin.addDirectoryItem(handle=addon_handle,
    url="plugin://plugin.video.ccv3/%s" % url,
    listitem=xbmcgui.ListItem("%s" % li), isFolder=True)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
separate pages application0