Append and/or Replace Album info (show date) into Title


#1

I know one of you geniuses can make a perfect action(s) for this.

I want to add the date of a live performance to the Track Title. The date is always in the Album field in this format "live: 1980-06-20 city, country"

Example --
From: The Train Kept A Rollin'
To: The Train Kept A Rollin' (1980-06-20)

One slight wrinkle. Some Titles already have "live " and the last 2 digits of the year in parenthesis.
Example -- The Train Kept A Rollin' (live '80)

So, I guess the first part of the action would have to check to see if "(live 'xx)" is already in the Title.

Thanks again for my favorite & most used program, next to Excel, haha.

tim


#2

Create an action group with the following steps:
Replace with regular expression for TITLE
Search string: (live.*)
Replace:
(=nothing)

Copy the contents of ALBUM to a userdefined field %tempalbum% (-> format value TEMPALBUM with %album%)

Replace with regular expression in TEMPALBUM:
Search: .(\d\d\d\d-\d\d-d\d).
Replace: $1
This should leave the date in TEMPALBUM

Format value TITLE
%title% live: %tempalbum%
Remove tag field %tempalbum%

This is not a sequence of actions that will work on its own. I think you have to apply a filter first.


#3

First of all - Thank you for your time! It's close but I need some assistance tweaking!! (again, thanks!)

Yes, I will be filtering as I go, so as to only apply these actions to a specific Album(s).

So, I created two action groups. The first one was almost spot-on; but it left a blank space at the end of the Title. Here is what I have, please let me know how to tweak:

Again, my user need: to remove the " (live '85)" from the Title: "Inside Out (live '85)"

Action: Replace with regular expression
Field: TITLE
Original: (live*)
Replace with:

Which, again, does everything but remove the space that lies between the two (and now at the end of the Title.) I tried putting a blank space before and after the slash but that either gave me an error or did nothing. How do I also include the space before the parenthesis?


The 2nd one seems to just copy the entire Album title (with an extra "live:").

Situation:
Currently the Title = Inside Out
Need the Title to contain the date from the Album.
Currently the Album = live: 1985-04-13 Melbourne, Australia

Desired result:
Title = Inside Out (1985-04-13)

I created action group with the following steps:

  1. Format Value
    Field = TEMPALBUM
    Format string = %album%

  2. Replace with regular expression
    Field = TEMPALBUM
    Regular expression = .(\d\d\d\d-\d\d-d\d).
    Replace matches with=$1

  3. Format value
    Field = TITLE
    Format string = %title% live: %tempalbum%

  4. Remove fields
    Fields to remove = %tempalbum%

Result was:
Title = Inside Out live: live: 1985-04-13 Melbourne, Australia

What do I need to tweak to achieve:
Title = Inside Out (1985-04-13)

Thanks again. This such a fun program!


#4

The first problem:
Two ways to solve this: either add a leading blank before the opening bracket:
Action: Replace with regular expression
Field: TITLE
Original: _(live*)
Replace with:
(where the underscore represents the extra blank)

Or you add an action of the type "Format value" for TITLE with
$trim(%title%)
as format string. This removes any trailing or leading blanks.

Now for the second case:
If you have written that down accurately then we have a simple syntax error.
You use : .(\d\d\d\d-\d\d-d\d).
But it should be: .(\d\d\d\d-\d\d-\d\d).

The but last "d" does not have a backslash so it behaves like a normal d and does not take the function of "any digit". As this search string finds no match, there is nothing replaced and you end up with the whole album added to the title.
(Because in general it should have worked ... ;-))


#5

Brilliant! That fixed it.

(fyi -- I just copy & pasted from your original reply)

I also had to change
Format string = %title% live: %tempalbum%
to
Format string = %title% (%tempalbum%)
to achieve the desire result, but all is well.

BTW, I just made another PayPal donation to MP3Tag for this outstanding program! Thanks all!!!