MinimServer Forum
Displaying 'Tag' preceded by 'AnotherTag' - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: Music Tagging (/forumdisplay.php?fid=9)
+--- Thread: Displaying 'Tag' preceded by 'AnotherTag' (/showthread.php?tid=2981)



Displaying 'Tag' preceded by 'AnotherTag' - Kryptik - 14-03-2016 20:08

Hello all, I'm a new user learning the ropes. I'm struggling to get an item to display in the way I'd like it to.

Using the control point I'd like to be able drill through the tags to get to composition and have it display the composer's name before the composition itself, or perhaps afterwards if it's easy enough switch. I'd like the sort order to still be based on the composition.

So, for instance, composition displays:
Smetana, Bedrich; The Moldau
Holst, Gustav; The Planets Op.39 H125
Stravinsky, Igor; The Rite Of Spring

The reason being that I'm still learning who's done what and I think this would be a good way to reinforce which composers have done what works.

Using mp3Tag I have:
ComposerSort for a composer's LastName, FirstName
ContentGroup reused for Composition

Using MinimServer I have:
aliasTags >> ContentGroup:Composition, ComposerSort:Composer Sort
indexTags >> Composer Sort, Composition

I thought the answer might be this, below, but it hasn't worked for me:
tagFormat >> Composition.indexFormat={$Composer Sort$Composition}

Could somebody kindly assist? Thanks.


RE: Displaying 'Tag' preceded by 'AnotherTag' - simoncn - 14-03-2016 22:40

Welcome to the MinimServer forum!

From this section of the MinimServer user guide:

The indexFormat option doesn't replace any existing tags in the item. For example, the option
WorkByTitle.indexFormat={$title$tonality$opusnumber$subtitle}
would add a WorkByTitle tag if it doesn't exist in this item. No tag would be added if the item already has a WorkByTitle tag. This limitation doesn't apply to the Artist tag.


Because you already have a Composition tag, the Composition.indexFormat option is leaving this tag unchanged.

You should be able to do what you want with the following:

aliasTags >> ComposerSort:Composer Sort
indexTags >> Composer Sort, Composition
tagFormat >> Composition.indexFormat={$Composer Sort$ContentGroup}


RE: Displaying 'Tag' preceded by 'AnotherTag' - Kryptik - 15-03-2016 01:11

After a bit of playing around with your solution I found that it was necessary to add ContentGroup into either the indexTag or itemTag. I favoured the latter then discovered where I'd gone wrong (though to be fair I have slightly moved the goalposts and created a new virtual tag for the result).

I was pretty close with my original as it turned out. As you highlighted the sticking point was, "No tag would be added if the item already has...[that same tag]". I should have done the following:
aliasTags >> ContentGroup:Composition, ComposerSort:Composer Sort
indexTags >> Composer Sort, Composition, ComposerWork
tagFormat >> ComposerWork.indexFormat={$Composer Sort$Composition}

Neither way has sorted the result as I hoped, instead it sorts according to the composer portion first, but that can solved another day.

Thanks for the assistance and superb software.


RE: Displaying 'Tag' preceded by 'AnotherTag' - simoncn - 15-03-2016 09:54

(15-03-2016 01:11)Kryptik Wrote:  Neither way has sorted the result as I hoped, instead it sorts according to the composer portion first, but that can solved another day.

It isn't possible to customize the sort order for an index value that was created using the indexFormat option. This is because the indexFormat option is processed after the tagValue property has been processed.