Artist: Adel Tawil
Title: Tu m'appelles (feat. Peachy)
to
Artist: Adel Tawil (feat. Peachy)
Title: Tu m'appelles
Of course, not only exact expression "(feat. Peachy)" should be moved, but everything beginning with "(feat", so that I can use it for the whole database at once.
I already tried several suggestions from the community, but I just can`t do it right.
For instance, I tried it with following two steps:
1) copy everything beginning with "(feat" from title to artist:
action: format tag field
tag field: artist
format string: %artist% $mid(%title%,$strchr(%title%,'(feat'),$len(%title%))
-> result for artist is: "Adel Tawil (feat. Peachy)"DONE!
2) delete everything beginning with "(feat" from title:
action: format tag field
tag field: title
format string: $trim($left(%_title%,$sub($strstr(%_title%,'(feat'),1)))
-> result for title is: Deletion of the whole title!
So obviously I am doing something wrong… which is no wonder as I have absolutely no idea what I am doing...
And actually, I do not want to copy and delete not only everything beginning with "(feat", but also everything beginning with "(ft." - how cant i put this together into only one string?
I would reallly appreciate it if somebody please could help me?
the problem is the function $strchr() which should really be $strstr().
$strchr() returns the position of a single character (in this case "f") ... which leads to "funden".
Afterwards, you have to filter the title tag also individually for at least
" und " | " and " | " y " | " with " | " mit " | " con " | "," | "@"
as they often are followed by co-artists (but not always - that is why you cannot do it automatically)
… and if you want to have replaced all this "feature" and "versus" stuff with just an "&", you only add following three action parts between part 3 and part 4:
REPLACE WITH REGULAR EXPRESSION
FIELD: "ARTIST"
REGULAR EXPRESSION: "(ft. | ft. | ft | f. | (featuring | featuring | (feat. | (feat | feat. | feat | ft.| vs. | vs | vs.| versus "
REPLACE WITH: " & "
Even though you found a solution (so many ways lead to Rome), it may be more concise to use an action of the type "Guess value" and an auxiliary field to move the featured name around.
This thread describes such a way:
The guessing pattern would be: %artist% (feat. %feat_artist%)
This would also save you to remove the leftover brackets and spaces.
Thank you so much for sharing your solution, @olum!
I did run into some issues implementing it, though. I think Actions 2 and 3 assume that there is nothing in the Title field to the right of the " feat." except for the featured artist string. Unfortunately, some of my tracks with featured artists have text like remix name (or whatever) afterwards. The current form of Actions 2 and 3 will move that text into the Artist field as well as deleting it from the Title field.
After some fiddling, I've found the following to work for removing variations on "feat." (the first if "feat." is surrounded by brackets, the second not):