Get list of ViewModes
#1
Hi,

ViewModes types and ids change from skin to skin. How can we get a list of all the current skin ViewModes (with their ids) so that we can give the user the choice to pick one (in settings), and we set it using "Container.SetViewMode(id)" on behalf of the user in our addons directory lists.

Thank you.
Reply
#2
You can't to my knowledge (and really shouldn't). Instead you should wait until Eden is out and we'll improve all this so it's far easier for the addon to suggest what views might be appropriate by specifying content on a finer scale and by specifying a path/id for which XBMC can use to retrieve the previous user setting for that content type and path/id combination.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
But isn't what you described is already there (I am using the RC1). I mean when I set the content type to the appropriate type, then the user get to choose from a proper list of viewmodes. If the user visit the same window (id/path) again, the previous selected viewmode will be set automatically by xbmc. This is really a great design principle. This I believe is already there, unless you mean something else?

With this approach, once the path/id change, the selected viewmode will change as well. It is a problem (sometimes) because each window must have a different path/id in most addon, but some of the addon would want to let the user set a view mode for one path/id, and apply it to all other similar path/id belonging to the same addon. If only there was another unique id (view_id) that you can set for similar lists/windows, and then xbmc will rembemer the viewmode based on this view_id, and not the path/id of the window itself. This will solve the problem for sure (without breaking the user experience of having to set it everytime, or go to settings to adjust it).
Reply
#4
Yes, the idea just needs improving - as you say, the problem is that the plugin can't specify that it should just use whatever view details the user has already set on pathA for pathB as well (eg all the same "levels" in your addon might use the same viewtype - user need only alter it once). So adding the facility for the addon to say "this listing should be referred to in the content/sort/view stuff with _bar_ id" will solve this.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Okay, this would be great. Hope to see this implemented soon, as it will be useful in most of the addons (if not all).
Thanks Jonathan.
Reply
#6
Sorry to revive my own old thread, but I didn't want to start a new thread. I've been away from add-on development for a while. Has anything changed regarding the ability to have a view_type for each path, and then have XBMC remember the viewmode based on this view_type instead of the current way of remembering it base on (id/path) only?
I just saw YouTube add-on force thumbnail view by taking the viewmode id number from the settings dialog. It would be better if that add-on could set a view_type="clips" and then whenever the user change the viewmode on a list with view_type="clips" then whatever view mode he chose would be used automatically in any future lists with the same view_type="clips" in the same add-on.

[DELETE]I could place this in the feature request forum, but the majority of people there are interested in the "functional features" and such implementation details would not interest them.[/DELETE]
Edit: I just realised there is a thread for addons API requests, so I linked this thread there.
Reply

Logout Mark Read Team Forum Stats Members Help
Get list of ViewModes0