Reset entire history of addon folder listings
#1
While developing a new feature for Amazon's PrimeVideo I stumbled in a problem I'm not quite sure how to solve. I currently have a folder-based navigation which works fine, but I might need to "start from the beginning again" on certain leaves:

Code:
Root directory structure
├ Profiles
│ └ Change user and refresh the root
├ Watchlist
└ […]

I can't use Updatelisting=True because it's several items down, Container.Refresh doesn't work either for the same reason, Container.Update shouldn't work as well, calling the addon from scratch doesn't work. Is there a way to wipe the history clean, so as to not have a "go back" ListItem at the beginning, and so that if the addon goes back it returns to kodi's addon menu (or wherever he was before)?

If not possible is there a way to tell Kodi to just go back one or more directories in the listings?

I could do the second best thing which is just to refresh the Profiles listing and then the user has to go back by himself, but I thought I'd ask in case someone knows of a way.
Image
Reply
#2
it is not clear because you have to go back 2 times
can you explain better your case?

with NF addon i have a similar structure but in some cases i use the Updatelisting it is mandatory to avoid mess of profile selection or other

Main menu (root)
├ Profiles (context menus to items to add profile operations, select listitem to change profile and reload the main menu)
├ Continue watching
├ Top 10
└ […]

the add-on start with the "Profiles" list (same code of subfolder "Profiles")
then when you select a profile listitem will be opened the root "main menu" with the use of Updatelisting=True to reset history and avoid sideeffect problems
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#3
There is the main root with main navigation and the profiles folder, and inside the profiles folder there are some controls and the list of profiles to switch to. In the ideal scenario I wanted to switch profile after the user selected it and then go back automatically to the root menu, but I don't think that's possible. For the moment I used updatelisting to update the inactive profiles within the "Profiles" folder, and then the user can move back on his own. At the moment it looks like this:

Code:
Root directory
├ Profiles directory
  └ clickable ListItem profile
    └ Change user on click

I could just updateListing to show a list of profiles, but that would cause a bit of navigation issues I think, the current's solution the second best thing, I guess. I'm a bit surprised there is no way to programmatically move up/down the virtual folder history, at least none that I could find.
Image
Reply
#4
when the user click "Change user" subfolder why not load directly the root directory with updateListing ? instead go back two times?
seem to me more clear

or an alternative can be use a dialog window to show the profiles list, and when the user select the profile it is possible refresh the root directory to apply the changes
Dev-Maintainer of InputStream Adaptive add-on, Netflix add-on ▫ Skills Python, C#, VB.NET and a bit of C++
Reply
#5
I think I got what you mean, just load the change user with updateListing, and once again when the profile is selected, so that the navigation restarts from the root everytime. It's a viable solution, not the one I currently implemented, I'm not sure how the Container.Update works with keyboards if a user tries to backspace when inside the profiles subfolder. I mostly remote/kbd with Kodi, so I always try to keep those things in mind.

Thanks for the pointers, though, there's some good strategies I might use later.
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Reset entire history of addon folder listings0