Posts: 247
Joined: Oct 2011
Reputation:
11
Is it possible to set the active skin via an addon?
I have an addon that requires a particular skin to be usable and want to give the user the option to auto enable the skin when the addon is installed.
Posts: 17,859
Joined: Jul 2011
Reputation:
371
2014-06-20, 10:43
(This post was last modified: 2014-06-20, 10:56 by Martijn.)
I would be pertinent against such a thing. Get other skins to support it as well. Switching to a completely different skin for using an addon is just silly.
A user has chosen a skin for a reason.
Posts: 247
Joined: Oct 2011
Reputation:
11
So is the answer is no, it cant be done?
or
Yes it can be done but not recommended?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
It's probably possible. Whether it would work or not is a completely different question. And yeah, it definitely should not be the way things go. Instead, the add-on should just supply what it needs (and we should fix stuff so that that works!)
Posts: 3,448
Joined: Jan 2011
Reputation:
362
pkscout
Team-Kodi Member
Posts: 3,448
An addon should definitely provide a skin neutral default GUI. It's a pain to do and won't look as nice as you'd like, but it is the right thing to do. You can also provide skin specific GUIs. If you're using WindowXML you can create a window (or dialog box) and there is a skin folder in YOUR-ADDON/resources/skins whose folder name matches the string ID of the active skin (e.g. for Confluence it would be skin.confluence) then that skin specific GUI will be used by default.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Aren't you just supplying a plugin and a service? If so, there's not really anything skinners should need to do other than make sure that the views normally available to movies et. al. are available to the plugin.
I'd recommend you change some of your service stuff though so that instead of supplying a bunch of properties, you instead provide a plugin that can be used as a directory service, so that skins can connect to it by just specifying the URL in <content>
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Rotating artwork can work just fine for XBMC's own stuff as well via extra fanart. Nothing MB3-specific there necessarily. i.e. skins that support it will support it for MB3 sourced items or XBMC sourced items (or other plugin sourced items).
The point is, if you use the standard approaches (extended as necessary, ofcourse - there's likely bits missing to the puzzle), skins will need less MB3-specific stuff. It may take longer to achieve the result you want, but everyone ends up benefitting.
Posts: 428
Joined: Oct 2008
Reputation:
18
Can you explain what you mean? To use extra fanart you have to have use the XBMC database, and you have to have files sitting in your media directories right?
MB3 removes the need to have art in media directories, and the XBMC database is no longer used with our plugin.
xnappo
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Not at all. The item itself can hold the artwork (via ListItem.Art(foo)). This might be filled by the database on fetch, or it might be set by the directory service. i.e. a plugin could provide similar art should they wish, presuming they have the facility to set art in this way.
I'm not sure exactly what the status of extra art via the database at this point (i.e. whether it's handled as a directory that a multiimage control fetches from, or whether you can set a bunch of potential art sources), so there may be some further work on the XBMC side required, but you get the idea?
How are you providing the images at the moment that are meant to rotate?
Posts: 247
Joined: Oct 2011
Reputation:
11
Bah it is what it is, the original question was can an addon set the active skin, it looks like the answer is no and even if it is possible which has been alluded to it would be frowned upon and the addon repo gate keeps would probably block the addon from being added to the official repo.
Not really as open as I expected, I can respect a simple "you should not do that" but a "you shall not do that" is a very rigid approach.
Anyway, thanks everyone for your input.
Posts: 1,088
Joined: Nov 2012
Reputation:
51
2014-06-22, 05:40
(This post was last modified: 2014-06-22, 05:56 by Karnagious.)
What is the addon and what is the skin?
Dont worry. Through a combination of awesome detective work and telepathy, I figured out the addon part.