Kodi Community Forum

Full Version: [REQUEST] Mapping Default Images?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently thinking about how best to setup the default images in the MiniMeedia skin (such as DefaultFolder.png, DefaultNetwork.png etc) and was thinking that it would be great if we were able to map image files to hard-coded images that are picked up by XBMC.

For example if I wanted to use the same image file for DefaultFolder.png and DefaultMusicPlaylists.png then as it currently stands I would have to add 2 copies of the same image (named accordingly) to the xpr.

It would be more efficient if I could define something like the following:

PHP Code:
<mappings>
  <
defaultfolder>DefaultFolder.png</defaultfolder>
  <
defaultmusicplaylists>DefaultFolder.png</defaultmusicplaylists>
</
mapping

or alternatively, like this:

PHP Code:
<mappings>
  <
mapping>
    <
original>DefaultMusicPlaylists.png</original>
    <
replacement>DefaultFolder.png</replacement>
  </
mapping>
</
mapping

At the moment there are more than 40 default images that need to be setup for each skin and in a lot of cases they will all be separate images but in some cases they might not be and in those scenarios it would be very handy to have the ability to map images like this.

It would also be handy for things like the rating images (rating0.png etc) as it would be great to be able to map each of the rating images to the songrating images (so 2 sets of rating images aren't needed).

PHP Code:
<mappings>
  <
songrating0>rating0.png</songrating0>
  <
songrating1>rating1.png</songrating1>
  <
songrating2>rating2.png</songrating2>
  <
songrating3>rating3.png</songrating3>
  <
songrating4>rating4.png</songrating4>
  <
songrating5>rating5.png</songrating5>
</
mapping

(Could also be handy to map images needed to skin stuff like AMT as that almost always means duplicating images)

What do others think, (a) is this useful and (b) is it possible?
Awww. Well I thought it was a good idea anyway but I guess no-one else shares that opinion. Sad
Apologies - I missed this one Smile

First off, many do fallback to DefaultFolder.png anyway (eg any of the "custom" video and music library ones)

I have no problem with the concept, though I fear the implementation could get a little sketchy. There may be some instances where we directly check the filesystem for instance rather than going via the texture manager to check for existence, though they should be eliminated anyway. I can't stop python developers doing this, however (no idea if they do or not).

Any comments from other skinners?

Cheers,
Jonathan
BTW I talked to skunk on IRC and liked the idea as well and went in favour of this one
Code:
<mappings>
  <defaultfolder>DefaultFolder.png</defaultfolder>
  <defaultmusicplaylists>DefaultFolder.png</defaultmusicplaylists>
</mapping>

Maybe it can be done in Skin.xml so its all mapped before the skin even loads
as for the rating ones I thought they all used Rating*.png now anyway
Yep, having it all lined up before the skin loads would be great.

Does that mean I can get rid of the songrating*.png images from my skins then? Will need to try that out
use ListItem.StarRating for all of them and yes I think the old Listitem.Rating might still use Songrating*.png