Author Topic: Function Help for Custom Tag  (Read 1121 times)

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9350
I'm trying to create a custom tag to display featured artists. And to not display if there aren't any. This is based on <Artists: Guest> and what I'm trying to do is if the track has no guest artist(s), then don't show it, otherwise display "Featured: <Artists: Guest>. Seems simple enough, but the function seems to be choking at the first <Artists:Guest>.
This is what I think should work:
Code
$IsNull(<Artists:Guest>,,Featuring: <Artists:Guest>
The error message I'm getting is:
FAIL @ "ists:Guest>,,Featuring: <Artists:Guest>"

Why is it cutting off "Art"  from the first tag?

FWIW, -this- works: Featuring: <Artists: Guest> when I use it in Track Details, but if there are no guest artists is shows 'Featuring:'.

Thanks.
 
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

psychoadept

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 10691
Is that a direct copy from your tag? The $IsNull is missing a close parenthesis.
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9350
Is that a direct copy from your tag? The $IsNull is missing a close parenthesis.
<sigh> Yes, it was a direct copy. But even adding the close parenthesis, it still throws the same FAIL error.
For example, this works:
Code
$IsNull(<Playlist>,None,<Playlist>)
While this does not:
Code
$IsNull(<Artists:Guest>,,Featuring: <Artists:Guest>)
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

hiccup

  • Sr. Member
  • ****
  • Posts: 7871
There is a space missing; it should be <Artists: Guest>

(if you use the field selector drop-down menu you can check the available tags and their exact names)

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9350
There is a space missing; it should be <Artists: Guest>
(if you use the field selector drop-down menu you can check the available tags and their exact names)
All along I was figuring either syntax or typo. I didn't suspect both. I know about the selector, and thought I had used it, but apparently not.

Thanks to psychoadept and you, problem solved.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here