2023-09-24, 18:02
I am pretty sure this should be possible in Kodi but I just can't figure out how. Here is my scenario...
I have a search function which takes a user search string and then builds builds a result set and displays it as a directory. Context menu commands allow for things like item deletion, adding/removing as favourites, etc. After executing any of the context commands a Container.Refresh is required. The problem is that the refresh doesn't just reload the result set, it also asks the user for the search string again.
My intended solution is to break the search into two addon reloads. First, choosing "Search" from the top-level menu would load a new folder, say "searchquery", and the code for that folder uses xmbc.Keyboard to ask for the search string. If the user doesn't cancel then the code for the "searchquery" folder should build a new URL which loads a second folder, say "search", just as if that second folder had been the action URL of a directory item. My thinking is that this way after the result set is displayed calling Container.Refresh will only reload the folder using the arguments passed to it from the "searchquery" folder code.
My problem is that I just can't figure out how to make Kodi change folders this way without actually using a directory list item the user has to click on. I can call the URL with executebuiltin('RunPlugin()') but that doesn't actually make Kodi completely change to another folder so the result set gets loaded but not displayed.
What am I missing?
I have a search function which takes a user search string and then builds builds a result set and displays it as a directory. Context menu commands allow for things like item deletion, adding/removing as favourites, etc. After executing any of the context commands a Container.Refresh is required. The problem is that the refresh doesn't just reload the result set, it also asks the user for the search string again.
My intended solution is to break the search into two addon reloads. First, choosing "Search" from the top-level menu would load a new folder, say "searchquery", and the code for that folder uses xmbc.Keyboard to ask for the search string. If the user doesn't cancel then the code for the "searchquery" folder should build a new URL which loads a second folder, say "search", just as if that second folder had been the action URL of a directory item. My thinking is that this way after the result set is displayed calling Container.Refresh will only reload the folder using the arguments passed to it from the "searchquery" folder code.
My problem is that I just can't figure out how to make Kodi change folders this way without actually using a directory list item the user has to click on. I can call the URL with executebuiltin('RunPlugin()') but that doesn't actually make Kodi completely change to another folder so the result set gets loaded but not displayed.
What am I missing?