Author Topic: Substitute for default return from <lyrics?> field?  (Read 1329 times)

sveakul

  • Sr. Member
  • ****
  • Posts: 2274
In the Track Information panel for Now Playing, adding <lyrics?> as a displayed field normally returns a null value when no lyrics are found, and "Y [unsynched]"  (e.g. Y [lyrics type]) when lyrics ARE found.

In the latter case when lyrics are found, is it possible to add code in the Track Information field entry that in place of the "Y" will substitute a text string like "Lyrics", resulting in a display like "Lyrics [unsynched]"?

I did a forum search and found many "near-misses", but got "code float"(!) after a while so I may have missed something :(

frankz

  • Sr. Member
  • ****
  • Posts: 3487
I'm not sure if this is what you're asking, but in my Track Information I use Last Played in this way:

Last Played: $If(<Last Played>="Unknown","Never"," "<Last Played>")

Which returns...
Last Played: Never

...when it's never been played, or...

Last Played: 12/31/2017

...if it has (returns whatever date is in the field)

Would <lyrics?> act the same way?  If so, you could maybe do...

$If(<lyrics?>="Y [unsynched]","Lyrics","")

...or, probably, if "Y [synched]" is also a thing...

$If(<lyrics?>="","","Lyrics")

If you want to check for the absence of it and return a uniform value if it's present.
Last Edit: June 05, 2018, 04:36:07 AM by frankz
A smile is happiness you'll find right under your nose.

sveakul

  • Sr. Member
  • ****
  • Posts: 2274
...or, probably, if "Y [synched]" is also a thing...

$If(<lyrics?>="","","Lyrics")

If you want to check for the absence of it and return a uniform value if it's present.

This one nails it frankz, THANK YOU!

frankz

  • Sr. Member
  • ****
  • Posts: 3487
Glad I could help.  I set that up so long ago it was a good for me to go over it again so I don't forget how.  Thanks for that push.
A smile is happiness you'll find right under your nose.

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3781
  • MB Version: 3.5.8402 P
To cover the 4 possibile returns from Lyrics? I use:
Code
$IsNull(<Lyrics?>,?,$If(<Lyrics?>="N [no lyrics]",Inst,$If(<Lyrics?>="Y [unsynched]",Stnd,Sync)))
MusicBee and my library - Making bee-utiful music together