MinimServer Forum
Reformat 'album' tag - Printable Version

+- MinimServer Forum (https://forum.minimserver.com)
+-- Forum: MinimServer (/forumdisplay.php?fid=1)
+--- Forum: Music Tagging (/forumdisplay.php?fid=9)
+--- Thread: Reformat 'album' tag (/showthread.php?tid=5188)



Reformat 'album' tag - RSJ - 31-01-2019 19:21

All my album names are in the format: 'Mahler - Symphony No. 2 [Gergiev]'

It there a way that I can drop 'Mahler - ' and ' [Gergiev]' (i.e. to leave 'Symphony No. 2') when I use the album tag?

Thank you.


RE: Reformat 'album' tag - simoncn - 31-01-2019 21:15

You can add things to a tag value (such as Album) using tag formatting but you cannot remove things.

If you have another tag that contains the value 'Symphony No. 2', you can use this tag value for the album title in place of the value of your Album tag.


RE: Reformat 'album' tag - aliasname - 03-02-2019 11:25

(31-01-2019 21:15)simoncn Wrote:  You can add things to a tag value (such as Album) using tag formatting but you cannot remove things.

Sure?
Wouldn't something like this work? (in a tagupdate file)

@ALBUM=Mahler - Symphony No. 2 [Gergiev]
=ALBUM=Symphony No. 2

Similar to how I split my multiple genres by utilising the output from an alltags file written by mimimserver and then process the matches so that they form an output ready to be pasted into the tagupate? Haven't tried though, but I would assume that all tag fields are handled the same way by MinimServer.


RE: Reformat 'album' tag - simoncn - 03-02-2019 18:06

Yes, this would work.


RE: Reformat 'album' tag - RSJ - 05-02-2019 15:06

(03-02-2019 11:25)aliasname Wrote:  
(31-01-2019 21:15)simoncn Wrote:  You can add things to a tag value (such as Album) using tag formatting but you cannot remove things.

Sure?
Wouldn't something like this work? (in a tagupdate file)

@ALBUM=Mahler - Symphony No. 2 [Gergiev]
=ALBUM=Symphony No. 2

Similar to how I split my multiple genres by utilising the output from an alltags file written by mimimserver and then process the matches so that they form an output ready to be pasted into the tagupate? Haven't tried though, but I would assume that all tag fields are handled the same way by MinimServer.

Thank you - could this work for all album titles with the use of wildcard characters, and if so, how would I format the instruction?


RE: Reformat 'album' tag - simoncn - 05-02-2019 15:23

The @ line needs to match the tag value exactly with no wildcards.

This means that doing what you want for a large number of albums isn't practical using a hand-edited tag update file and you would need to have some automated process for creating the tag update file from your album tag values. Alternatively, there are tag update programs (such as Mp3tag) that have a batch processing capability for making changes like this across your library.


RE: Reformat 'album' tag - RSJ - 06-02-2019 19:26

Thank you. I think things will have to stay as they are as I do not want to edit the original tags stored in the files.


RE: Reformat 'album' tag - paultaylor - 07-02-2019 08:41

(06-02-2019 19:26)RSJ Wrote:  Thank you. I think things will have to stay as they are as I do not want to edit the original tags stored in the files.
It sounds like you need to add a WORK tag, then you could configure MinimServer to use this instead of the ALBUM tag for its ALBUM field.


RE: Reformat 'album' tag - simbun - 01-03-2019 09:36

If you really do want to avoid making tag changes you could use foobar2000 to generate the tagUpdate file for you - as long as your album names do all follow a certain pattern.

Using the component foo_utils (http://foosion.foobar2000.org/components/?id=utils) you can create a custom export script, something like:

Code:
#Header    
#Body
@ALBUM=%album%$crlf()
=ALBUM=$trim($substr(%album%,$add($strchr(%album%,'-'),1),$sub($strrchr(%album%,'['),1)))$crlf()
#Footer

This will create a replacement entry for every item in your Library selection, which whilst it doesn't seem to cause a problem for MinimServer (at least in my test of 3 items) it's best to limit it to one per album, so maybe a filter something like: ALBUM HAS [ AND ALBUM HAS - AND TRACKNUMBER IS 01

Then just select all the items in the Library selection, Right Click -> Legacy Commands (unsorted) -> Copy Text, and paste it into a tagUpdate file.