Complex manage featured artists, moving & copying between fields

I'm a few steps away from finiliasing my actions template to organize my library. I spend the past two days on the forum trying to figure it out the below to no avail.

  1. Move (not copy) featured artists from title to artist filed.
    Titles I might have:

These Days (ft Jess Glynne, Macklemore & Dan Caplen) (R3hab Remix)
Result: Artist tag: Jess Glynne, Macklemore & Dan Caplen
Result: Title tag: These Days (R3hab Remix)

These Days ft Jess Glynne, Macklemore & Dan Caplen (R3hab Remix)
Result same as above: Artist tag: Jess Glynne, Macklemore & Dan Caplen
Result same as above: Title tag: These Days (R3hab Remix)

Symphony (ft Zara Larsson) (R3hab Remix)
Result: Artist tag: Zara Larsson
Result: Title tag: Symphony (R3hab Remix)

Symphony ft Zara Larsson (R3hab Remix)
Result: Artist tag: Zara Larsson
Result: Title tag: Symphony (R3hab Remix)

Symphony (ft Zara Larsson) (Extended Mix)
Result: Artist tag: Zara Larsson
Result: Title tag: Symphony (R3hab Remix)

Symphony (ft Zara Larsson)
Result: Artist tag: Zara Larsson
Result: Title tag: Symphony (R3hab Remix)

Symphony (ft Zara Larsson) (Future House) (Free Download)
Result: Artist tag: Zara Larsson
Result: Title tag: Symphony (R3hab Remix)

SHIVA (Sunburn 2017 Anthem) (ft The Golden Army)
Result: Artist tag: The Golden Army
Result: Title tag: SHIVA (Sunburn 2017 Anthem)

These Days (R3hab Remix) ft Jess Glynne, Macklemore & Dan Caplen
Result: Artist tag: Jess Glynne, Macklemore & Dan Caplen
Result: Title tag: These Days (R3hab Remix)

My featuring is always abbreviated to ft like in the examples above. If there are no ft artists, then don't copy anything to the artist tag.

Some examples above are unnecessary, however I wanted to explain as thorough as I possible.
There is a second part of how I would like featured artists to be managed, after the above edits are performed. However, I don't want to make the original post long or create confusion.

Thank you for your time

I don't think that this can be done in just a single step.
I would first of all get all titles into a unified sequence: title _ featured artist.
This could probably be achieved with (several) actions of the type "Replace with regular expression"
e.g.

Search string: (.*) \(ft (.*)\) (\(.*\))
Replace String: $1 $3 _ $2
Which leads to
"These Days (R3hab Remix) _ Jess Glynne, Macklemore & Dan Caplen"
Do something similar to the other patterns - you probably only have to modify the search pattern.

... could be treated with a
Search string: (.*) ft (.*) (\(.*\))
Finally, when all files match the pattern "title _ artist" use an action of the type "Guess value"
Source: %title%
Target: %title% _ %artist%

1 Like

Thank you for such a quick reply!

Your solution works.

Could you please help with the other patterns as I can't seem to edit the search string correct.

The remaining patterns would be:

  1. Symphony (ft Zara Larsson)
    Result: Artist tag: Zara Larsson
    Result: Title tag: Symphony (R3hab Remix)

  2. SHIVA (Sunburn 2017 Anthem) (ft The Golden Army)
    Result: Artist tag: The Golden Army
    Result: Title tag: SHIVA (Sunburn 2017 Anthem)

  3. Symphony (ft Zara Larsson) (Future House) (Free Download)
    Result: Artist tag: Zara Larsson
    Result: Title tag: Symphony (R3hab Remix)

  4. These Days (R3hab Remix) ft Jess Glynne, Macklemore & Dan Caplen
    Result: Artist tag: Jess Glynne, Macklemore & Dan Caplen
    Result: Title tag: These Days (R3hab Remix)

--

Also I noticed that creating an action and applying it to all files, could potentially create a problem, for example running:

Search String: (.) (ft (.)) ((.*))

and if there's a title field
with Title: Symphony (ft Zara Larsson) (Future House) (Free Download)

edits the title to:
Symphony (Free Download) _ Zara Larsson) (Future House

So I would need to be careful in what order I would apply the Search strings correct?

All those where the "ft xyz" is already at the end could be treated directly with "Guess value"
The source patter would always be the same: %title%

But the target pattern would vary:
1 & 2 : %title% (ft %artist%)
4: %title% ft %artist%

Case 3 is the trickiest.
You need a unifying "Replace with regular expression" first:
Search string: (.*) \(ft (.*)\) \((.*)\) \(.*
Replace string: $1 ($3) _ $2

And then "Guess value" with
Source: %title%
Target: %title% _ %artist%

1 Like

Thank you for the replies! I made a minor mistake in my previous post with the explanation at case 3, but you picked it up most likely.

I found that I need to apply the the solutions in a specific order, which is not a problem at all, just pointing it out. All your solutions work great! Thank you

Could you please help me with the following, as its related to the same topic? It may sound counter intuitive to the above but I have libraries for different purposes, djing vs organizing and listening.

What I'd like to, is to also have the ability to copy (not move) the artist field, to the title field in the following manner.

Examples:
Case 1.
Artist: Francisca Hall
Title: Lazer Love

Result: Lazer Love (ft Francisca Hall)

Case 2.
Artist: Francisca Hall
Title: Lazer Love (Extended Remix)

Result: Lazer Love (ft Francisca Hall) (Extended Remix)

Case 3.
Artist: Francisca Hall
Title: Lazer Love (Extended Remix) (Free Download)

Result: Lazer Love (ft Francisca Hall) (Extended Remix) (Free Download)

This time, case 1 is the odd one out - but for that there is a thread in the FAQs:


only replace the "xyz" with "ft %artist%".

Case 2&3 can be treated in 1 go:
An Action of the type "Format value" for TITLE (or Convert>Tag-Tag)
Format string: $regexp(%title%,(.*?) (\(.*\)),$1 (ft %artist%) $2)

1 Like

For case 2 & 3, the result is correct. Thank you for the quick reply! I encounter 2 minor issues.

One is that after running the action I receive ": " at the beginning of the title.
The second is, in case the artist field is empty, the action to not perform or add (ft ) to the title field.

Thank you

You would have to show me the format string that you use - I don't see anything where the : could come from.

Then please filter for files that do not have an empty ARTIST and apply the action only there.

Oops my mistake. I added a ": " before the format string without noticing it. All is great.

About the empty artist field, is it possible to have a filter as an action? I found a thread from '18 that its not possible. In any case, I could after use another action to delete any potential (ft ) that were added to the title. I 'm creating one big action group to deal with files in one go.

This will not really lead to success even if you have some fancy $if() condition in the action as you still have to take care of the files that do not have a filled ARTIST field.
(I wonder how this could happen at all esp. as you take so much effort to get the various pieces of information to the correct place).
I would say: fill the ARTIST field and all the actions will work without filter.
Right now, the actions will work if you apply the filter.
So before

I dedicate the "albumartist" for the main artists and the "artist" field for any guest/featured artists. I skip adding the main artists in the "albumartist" field as well to the the "artist" field. This way each field has a dedicated purpose for indexing and listing. For example, this is useful for searching and listing only featured artists, without getting unnecessary entries. Your help has been amazing. Thank you. I consider my issue completely solved :slight_smile: I will be creating two more forum post soon, if you could help there as well it would be amazing. Thank you again!

I see.
Then please modify
Format string: $regexp(%title%,(.*?) (\(.*\)),$1 (ft %artist%) $2)
to
Format string: $regexp(%title%,(.*?) (\(.*\)),$1[ (ft %artist%)] $2)

1 Like

That works great! Thanks so much! :slight_smile:

I tried editing the Format string:

$regexp(%title%,(.*?) (\(.*\)),$1[ <ft %artist%>] $2)

to copy the artist to the title before any [ ] instead of ( ) (as currently the release type is enclosed in square brackets) but I can't seem to figure it out.

Edit: enclosed as preformatted text

Could you do 2 things, please:
Enclose anything that should look like you typed it in in grave accents (top left to bottom right) - without this markup the forum formatter interprets a number of important characters as format instructions.
Second, please also show an example of before and after with real data.
For now I take
Case 2.
Artist: Francisca Hall
Title: Lazer Love [Extended Remix]
Result: Lazer Love <ft Francisca Hall> [Extended Remix]

This could be achieved with an action of the type "Format value" for TITLE with
Format string: $regexp(%title%,'(.*) (\[.*)',$1 <ft %artist%> $2)

1 Like

Thank you for the solution! I enclosed it as preformatted text. Next time I'll also show an example!
Thank you once again! :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.