PDA

View Full Version : Possible default label is video/music  not scanned


hades_666
2005-10-31, 20:31
hi all,

possible default label is video/music was not scanned.

if i have a video scanend to the db then the home reflects the directory, title , year etc....

is there a way to attach a default value (ie: not a scanned item or n/a) to show in the label when a particular media is not scanned?

<control>
<description>video director label</description>
<type>fadelabel</type>
<id>1</id>
<width>210</width>
<posx>207</posx>
<posy>338</posy>

<label> not scanned </label> <--exmaple

<info>videoplayer.director</info>
<align>left</align>
<font>special12</font>
<visible>player.hasvideo</visible>
</control>

any ideas? or am i just not searching correctly for an answer.

hades_666

jmarshall
2005-11-01, 00:56
from a quick reading of the code, this is not possible.

i'm not sure whether this is a good thing or not at this point.

one way to test it out is to play with guilabelcontrol.cpp. in the render() routine, there is the code that checks if it contains information, and receives a string from the infomanager. an additional test would be to check this for zero length, and reassign the normal label:


if (m_vecinfo.size())
{
strrenderlabel = g_infomanager.getlabel(m_vecinfo[0]);
if (strrenderlabel.isempty())
strrenderlabel = szlabel;
}


note sure how to best handle this for fade labels though...

cheers,
jonathan

hades_666
2005-11-01, 05:28
ill take a look at it. thanks for the input to the correct area. :)

however, the issue i see with that however is that xbmc uses the label number ids as well , for example

<control>
<description>ok button</description>
<type>button</type>
<id>10</id>
<posx>355</posx>
<posy>330</posy>
<width>50</width>
<height>32</height>

<label>186</label> <--- the ok label

<font>font10</font>
<onleft>10</onleft>
<align>center</align>
<onright>10</onright>
<onup>10</onup>
<ondown>10</ondown>
</control>

so if i we to parse the strrenderlabel as szlabel the label in this instance would be 186 and not ok right?

jmarshall
2005-11-01, 05:54
nope, if it's numerical, it's translated first (before it gets to guilabelcontrol)