Kodi Community Forum

Full Version: Altering default views
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
HI,

I'm trying to mod a skin to allow a user to select the default view, rather than having to set them individually for all items (such as TV shows and seasons). The skin I'm doing this on is Quartz V3, but I assume the same procedure would apply to all skins.

Anyway, I have altered the defaultcontrol item in myVideoNav.xml, deleted the myviews db and also guisettings, but still the standard list view (50) persists. It doesn't matter what view I use, it always uses 50.

Is it possible to change the default or am I doing something wrong. Or should I be approaching this from another angle?

The next part was to code this up as a user setting, so I'm also assuming that using a skin setting property within the defaultcontrol tag is ok?
You need to change the order of the view IDs in the <views>...</views> tags.
(2012-12-05, 10:57)Hitcher Wrote: [ -> ]You need to change the order of the view IDs in the <views>...</views> tags.

Thanks - that worked - but has generated some more questions

Does defaultcontrol actually do anything. it seems to default to only the first view in the list, regardless of what the default control is set?

Is there a better way to manipulate views than this that currently exists?
Default control (50) means that focus should be set on container 5x, where X is the number of last used view (say 50, 53, 59...)

Views are rmmembered automatically by Xbmc for libraries but i think they are not remmembered for addons. You could force default view from addon but I'm not sure if it could be variable that is defined in addon settings.

Hope this makes sense?
Ah, ok I understand. Makes doing it via a skin very complicated.

I did a bit of looking around and implemented a workaround within my addon.

I've created a setting, where the user sets their skin and default view and I take this an enforce that view through container.setviewmode(id). The view can be set differently for tv, tv episodes,music and movies.

It works really well, just means I have to code up the addon to understand the names and ids (and update them if they change).