Page 1 of 1

Switching between wide icons and big icons?

Posted: Thu Sep 11, 2014 3:03 am
by XC-3730C
As I understand it, either wide or big icons need to be named default.tbn, correct? If this is the case, how can I have both wide and big icons in the same folder so I could switch between the two?

Re: Switching between wide icons and big icons?

Posted: Thu Sep 11, 2014 3:30 am
by Dom DXecutioner
XC-3730C wrote:As I understand it, either wide or big icons need to be named default.tbn, correct? If this is the case, how can I have both wide and big icons in the same folder so I could switch between the two?
Since you're not being specific, I'll speculate you're referring to the programs section of xbmc!

Normally we use a an image control to, you guessed it, display images; the <texture></texture> property is used to point to the path of the image you wish to display. We use the standard ListItem.Icon info label to display the image that xbmc has scanned by default.

Code: Select all

<control type="image">			<!-- default square icon -->
	<posy>89</posy>
	<posx>49</posx>
	<width>128</width>
	<height>128</height>
	<aspectratio>stretch</aspectratio>
	<texture>$INFO[ListItem.Icon]</texture>
</control>
To override that icon, we then place an image at the root of the game/emulator/program folder named "default.tbn"; we can then continue to use the same ListItem.Icon info label. At this point, it doesn't matter if the default.tbn image is of poster/thumb/icon/wideicon; however, the skin that you'll be using will have to support that specific view.

You really can't have multiple image types, ie. poster/thumb/icon/wideicon for the same item without doing some customization to the skin or creating a new view yourself. At least I'm not aware of any skin that will support this. Most skins will only support one type per game/emulator/program.

Re: Switching between wide icons and big icons?

Posted: Thu Sep 11, 2014 8:18 am
by XC-3730C
Oh too bad it couldn't be say, default.tbn for a wide icon, and folder.jpg for a big icon and be able to switch icon views based on that.

Switching between wide icons and big icons?

Posted: Thu Sep 11, 2014 8:20 am
by Dom DXecutioner
Like I said, you can, but you'd have to edit the views of your preferred skin, otherwise you'll have to stick to one type of image.

Re: Switching between wide icons and big icons?

Posted: Thu Sep 11, 2014 10:48 pm
by XC-3730C
It would be awesome if there was a program plugin for xbmc4xbox that somehow would let you rename the default.tbn to folder.jpg and vice versa because it seems to be that whatever is named default.tbn takes precedence over anything else.

Re: Switching between wide icons and big icons?

Posted: Mon Sep 15, 2014 5:50 pm
by Dan Dar3
@XC-3730C
Change the path in the code below (that's where it starts recursively, backup your stuff so it doesn't break it for you), upload through FTP as Q:\scripts\rename.py and then run from Scripts screen.

Code: Select all

import os

RENAME_IN_PATH = "X:\whatever\path\to\start"
RENAME_FROM    = "default.tbn"
RENAME_TO      = "folder.jpg"

for dirpath, dirnames, filenames in os.walk(RENAME_IN_PATH):
    for filename in filenames:
        if filename == RENAME_FROM:
            rename_from = os.path.join(dirpath, RENAME_FROM)
            rename_to   = os.path.join(dirpath, RENAME_TO)
            print "Rename %s => %s" % (rename_from, rename_to)
            os.rename(rename_from, rename_to)
References:
https://docs.python.org/2/library/os.html