ignore empty values in fadelabel

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Jeroen Offline
Skilled Skinner
Posts: 2,499
Joined: Feb 2008
Reputation: 23
Location: The Netherlands
Post: #1
I think it would be useful if fadelabels could have the option of skipping labels that are currently empty.
For instance in my music overlay I want to have a fadelabel switching between showing the currently playing track and the track next up in the playlist. If the last song of a playlist is playing or it has just 1 track it will switch between showing the playing track and showing..nothing
I also have a fadelabel showing lastfm related stuff, which are not always filled like the time left before submitting. Here this would be useful too.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #2
Hmm, thought it already did this. If not, seems like an easy addition (famous last words...)

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Jeroen Offline
Skilled Skinner
Posts: 2,499
Joined: Feb 2008
Reputation: 23
Location: The Netherlands
Post: #3
Nope, I definitely get empty space. Unless there's a magical tag I don't know about Smile
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #4
Revision 14625 may do the trick.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Jeroen Offline
Skilled Skinner
Posts: 2,499
Joined: Feb 2008
Reputation: 23
Location: The Netherlands
Post: #5
Thanks Jonathan, working for me Smile It does still refresh itself though (so the fading out and in of the label) even if there's just one value. That's not a big deal though.

One thing I failed to think of when posting my request though is this.
In the music overlay I want to have the two labels filled by these localized strings:

Code:
<string id="31077">[color=sublabel-text]Next track: [/color]$INFO[MusicPlayer.offset(1).Title] [color=sublabel-text]by [/color]$INFO[MusicPlayer.offset(1).Artist]</string>

<string id="31078">[color=sublabel-text]Playing [/color]$INFO[MusicPlayer.Title] [color=sublabel-text]by [/color]$INFO[MusicPlayer.Artist] [color=sublabel-text]from the album [/color]$INFO[MusicPlayer.Album]</string>

Now, in this case the "next track" label will show up even if there's no next track in the playlist. This of course makes total sense as the label isn't empty, it always has the static predefined text. Is there any way I could get around that? So to only display when the info management returns a "dynamic" value?
If not, I guess I could easily solve this should this request be implemented.

In any case thanks for your efforts Smile
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #6
You could try something like this:

Code:
<string id="31077">$INFO[MusicPlayer.offset(1).Title,[color=sublabel-text]Next track: [/color],]$INFO[MusicPlayer.offset(1).Artist, [color=sublabel-text]by [/color],]</string>

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Jeroen Offline
Skilled Skinner
Posts: 2,499
Joined: Feb 2008
Reputation: 23
Location: The Netherlands
Post: #7
Heh, didn't know about that. That works perfectly Smile
Thanks!
find quote