Kodi Community Forum

Full Version: ignore empty values in fadelabel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Hmm, thought it already did this. If not, seems like an easy addition (famous last words...)

Nope, I definitely get empty space. Unless there's a magical tag I don't know about Smile
Revision 14625 may do the trick.

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:

<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
You could try something like this:

<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>

Heh, didn't know about that. That works perfectly Smile