Page 1 of 1

Tag Write Customization

Posted: Mon May 27, 2019 9:03 pm
by Hedgehog
Hello everyone,

when writing to mp3 tags, i would like to set the "Album Artist" field to the "sort by" variable of the Artist (for examlpe set the field to "Beatles, The" instead of "The Beatles").
As I understand, this should work by using an xsl template, which is assigned to the "Album Artist" tag.
Unfortunately I am not familiar with the xsl language, so I can not extract what to do from the example templates.
How can I access the "sort by" variable of the Artist entry?

The checkbox "Sort by/Titile Sort" in the "Tag Miscellaneous" tab does not work for me, because it sets all tags to their sort values, not only the Album Artist field.

Many thanks in advance for your help!

Regards
Hedgehog

Re: Tag Write Customization

Posted: Tue Jun 18, 2019 8:21 pm
by Hedgehog
Hello everyone,

is there none of the programming experts still active in this forum?
What happened?

Regards
Hedgehog

Re: Tag Write Customization

Posted: Wed Jun 19, 2019 4:15 pm
by gschoene
Hello,
you can select Tools, Audio File Options , Tag Miscellaneous - Customize Tag Write (at the bottom) - Select Album Artist and drop the xsl code to the right field.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<?data type="record"?>
<?data table="track"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:template match="/">
    <xsl:value-of select="/data/record/albumdata/artists/@sort"/>
</xsl:template>

</xsl:stylesheet>
With the Test Button you can verify the result for the currently selected row in the database.

Hope this helped a bit. I never used that before but nice to know.
Have fun.

Re: Tag Write Customization

Posted: Wed Jun 19, 2019 8:44 pm
by Hedgehog
Hello Günter,

many thanks for your help!
It seems that your solution works properly!

My intention to write the sort value into the album artist field is that I frequently use a Tag Editor (MP3Tag) to prepare and pre-sort audio files before integrating them into the CATraxx Database. AlbumArtistSort then works as name for the folder structure.

Thanks again and best regards

Hedgehog

Re: Tag Write Customization

Posted: Mon Jul 01, 2019 3:27 pm
by Peerli
Hello Günter.
Can I add more tags? Eg. Lyrics or Notes? Pre-existing XSL templates are not available for this purpose.
LG
Peer