Solved Is there a way to change parent directory (or detect if I navigate back)
#1
The issue is simple, yet I'm struggling with it a bit (routing)

Plugin has search as directory item
In Search there is a list of query you look for and 'New Search' item that when you click open Keyboard Input, ask you for query to find, add it to list and open the directory with results.

This part works fine, but when I navigate back from query results Keyboard is executed again.

I understand that this is because search is : /search/
The new search is /search/new/
and search query results are /search/query/<queryname>/

So when going back from Search Results its Parent Dir is New Search so the Keyboard Input is displayed.

I'm trying to figure how to bypass that one parent directory so when I go back from Search Result to Search directly.
Proud developer for Shoko and Nakamori. Long time xbmc/kodi user. IT Freak at Monogatari.
Reply
#2
Looks like this function returns Parent for me.
I just check from which direction the user is coming

xbmc.getInfoLabel('Container.FolderPath')

If the path contains specific word like /result I just bypass showing keyboard input.
Proud developer for Shoko and Nakamori. Long time xbmc/kodi user. IT Freak at Monogatari.
Reply
#3
I'm doing this in another way, here is example: plugin.video.tvzavr.ru/default.py
In short, You must create url for /search/query/<queryname>/ and call it with
python:
xbmc.executebuiltin('Container.Update("%s")' % url)
My addons: Gismeteo
Reply
#4
(2019-08-24, 21:40)vl_maksime Wrote: I'm doing this in another way, here is example: plugin.video.tvzavr.ru/default.py
In short, You must create url for /search/query/<queryname>/ and call it with
python:
xbmc.executebuiltin('Container.Update("%s")' % url)

Oh I see you pass parameter also, and detect if you did something before.
Also I didn't know about 'Container.Update' - that's something useful, thanks.
Proud developer for Shoko and Nakamori. Long time xbmc/kodi user. IT Freak at Monogatari.
Reply

Logout Mark Read Team Forum Stats Members Help
Is there a way to change parent directory (or detect if I navigate back)0