1

Topic: Leave Untagged Fields

I'm not sure whether this should be in the 'How to" or the "Evolution" section.

I have these files in a folder:

John Denver - 02 - Annie's Song.mp3
John Denver - 07 - For Baby (For Bobbie).mp3
John Denver - 08 - Goodbye Again.mp3
John Denver - Annie's Song.mp3
John Denver - Grandma's Feather Red.mp3

The first three have their "Artist - Track number - Title" fields tagged, whereas the last two have only the "Artist - Title" fields tagged.

Wherever feasible, they should be renamed as:
    Artist - Track number - Title.%e
The main emphasis here is on 'wherever feasible'. So when I insert this line:
    %ma - %mT - %mt.%e
I get this:
John Denver - 02 - Annie's Song.mp3
John Denver - 07 - For Baby (For Bobbie).mp3
John Denver - 08 - Goodbye Again.mp3
John Denver -  - Annie's Song.mp3
John Denver -  - Grandma's Feather Red.mp3

Can Siren 1.90 be told to rename mp3 fields only where the corresponding tags are present? In this case, the last two files (that do not have their 'track number' tagged) should not be renamed containing '- - ' in the middle.

Re: Leave Untagged Fields

I think the 1.90 can do it. Maybe not the way you expect.

If I summarize your need:
You want to rename your mp3 with: %ma - %mT - %mt.%e
The problem is that if "%mT" is empty you get an unneeded "- " between the artist and the title.

The idea is here to append to "%mT" the string " - " only if it contains something.

This can be done with a regular expression modifier like: %mT(s/(.+)/$1 - /)

Where:
s/ : indicates that what follows is a regular expression modifier
(.+) : search for any non empty character string and make it usable in the replacement part
/ separates the regular expression from the replacement format
$1 - : is the replacement format. $1 refers to the value of "(.+)" and " - " is fixed text
/ finishes the format string

If "%mT" is empty, "(.+)" is not "found" and so not replaced ...

The final expression will look like: %ma - %mT(s/(.+)/$1 - /)%mt.%e

Hoping it will help.

Re: Leave Untagged Fields

Good request RR
> Can Siren ... be told to rename ...fields only where the corresponding tags are present?

and good solution from Rémi.

If one can't remember this RegEx in the future
maybe he can simple sort the 'Track' column
and rename than in two steps... one time select the files with track numbers and use  %mT ..... and then select all the others without %mT ?
This only as work around of course.

4

Re: Leave Untagged Fields

Gosh! What a solution! Absolutely works! Thanks!

You guys are great! Very much 'live n' kickin' ;-)

Also... this Siren really is something!