PDA

View Full Version : Custom tag mapping help



Daverz
2009-10-01, 07:35
I'd like to create a custom tag with a format like

ARTIST/CONDUCTOR/BAND

I've tried

ALLARTISTS=combine ARTIST|ARTIST(text=/)|CONDUCTOR|CONDUCTOR(text=/)|BAND

But this results in a trailing slash if there is no CONDUCTOR or BAND. Is there a better way to do this?

I'd also like to add another custom tag to disambiguate multiple recordings with the same artists. Can I do something like this?

ALLARTISTS=combine ARTIST|ARTIST(text=/)|CONDUCTOR|CONDUCTOR(text=/)|BAND,DESCRIPTION=oneof SHORT_DESCRIPTION|ALLARTISTS

where MOREINFO is a custom tag and ALLARTISTS and DESCRIPTION are virtual tags. So if a tag SHORT_DESCRIPTION is non-empty it is used, else the ALLARTISTS virtual tag is used.

erland
2009-10-01, 21:54
I'd like to create a custom tag with a format like

ARTIST/CONDUCTOR/BAND

I've tried

ALLARTISTS=combine ARTIST|ARTIST(text=/)|CONDUCTOR|CONDUCTOR(text=/)|BAND

But this results in a trailing slash if there is no CONDUCTOR or BAND. Is there a better way to do this?

Try this:
ALLARTISTS=combine ARTIST|CONDUCTOR(text=/)|CONDUCTOR|BAND(text=/)|BAND

However, I suppose you would get a leading / if ARTIST was missing so I'm not sure if that'll cause a problem ?



I'd also like to add another custom tag to disambiguate multiple recordings with the same artists. Can I do something like this?

ALLARTISTS=combine ARTIST|ARTIST(text=/)|CONDUCTOR|CONDUCTOR(text=/)|BAND,DESCRIPTION=oneof SHORT_DESCRIPTION|ALLARTISTS

where MOREINFO is a custom tag and ALLARTISTS and DESCRIPTION are virtual tags. So if a tag SHORT_DESCRIPTION is non-empty it is used, else the ALLARTISTS virtual tag is used.

I think it will work, but I'm not completely sure. I don't have the time to look at the code at the moment to tell for sure.

Why don't you give it a try and see what you get and report back if it works or not.

Daverz
2009-10-02, 07:00
Try this:
ALLARTISTS=combine ARTIST|CONDUCTOR(text=/)|CONDUCTOR|BAND(text=/)|BAND

However, I suppose you would get a leading / if ARTIST was missing so I'm not sure if that'll cause a problem ?


Yeah, that's the one I tried first, and you do get the leading /.

What I eventually ended up with is this:

FIRSTARTIST=oneof UNIQUENAME|ARTIST|CONDUCTOR|BAND

Usually just the artist or conductor is enough info to distinguish a recording, but if it's not, the UNIQUENAME tag is used.