I have a number of albums which contain multiple artists for individual songs.
Because the album is by a particular artist, even if another artist is featured, I want the artist to be that of the album (files are stored in music>artist>album>tracknumber trackname) and anyone else featuring on a particular track should appear only in the filename (music>artist>album>tracknumber trackname (feat. other artist).
For example, at the moment I have a Stereophonics album which includes songs they have done with other people like Tom Jones. Under Artist it lists all Artists separated by a comma (Stereophonics, Tom Jones).
If I were to create an action to include the featured artist (in this case Tom Jones), it would also include the name of the artist (Stereophonics).
coming back to the original problem:
Do you have the featured artist(s) separated by a unique identifier or is it just a comma?
(then beware of groups like Earth, Wind & Fire; Dave Dee, Dozy, Beaky, Mick and Titch and so on).
you can filter for files where ALBUMARTIST does not match the ARTIST:
"$if($eql(%artist%,%albumartist%),1,0)" IS 0
I would then first of all move all featured artists to a user-defined field like FEAT_ARTIST.
Use an action of the type "Guess value" for that.
Now, with the more structured data, you do more or less anything you want, like add the featured artists to the title.
Use an action of the type "Format value" for that.
A small piece of advice here: if you use unique separators straight away like e.g. the <>, then it is easy to treat the data in these separators.
So the title might be
Mama told me not to come <& Tom Jones>
If you want to get that as "feat" in the filename, use
Could you please document the actions in plain language?
I do not want to look up which code stands for which action and which option for each action.
Creating a column named FEAT_ARTIST with the contents of ARTIST does progress your endevour.
Instead, the action of the type guess value distributes the contents of the source to named target fields. You create a user-defined field when you use the syntax for fields but do not use a reserved fieldname - in this case it would be %feat_artist%.
So to split the existing artist e.g.
so that Stereophonics stays in ARTIST but Tom Jones goes to FEAT_ARTIST, use as
Now have a look at the extended tags (Alt-T) and see that you have a field FEAT_ARTIST with the contents Tom Jones and the field ARTIST is now only filled with Stereophonics.
Tried this and checked extended tags by using the keyboard shortcut but couldn't see FEAT_ARTIST anywhere?
Based on what you have said I think I have it set up correctly?
Also, I have noticed in some instances that the order of artists who contributed to a track can be wrong. For example, one of the Stereophonics songs lists Tom Jones first, which would mean once this rule works, it removes his name and adds (feat. Stereophonics).
Is there a way to prevent this happening? Again, avoid duplicating the album artist regardless of the order of artists showing?
the setup looks ok provided you really have that kind of separator - it is taken absolutely literally.
So if you do not have a blank behind the comma, it will fail.
So please check that again and then see if you then succeed.
Looking at the other problem, that with the swapped artists: again: MP3tag does not read or understand the contents of fields. It compares patterns.
as I described earlier, the guess value action is only one of a number of steps. THe other steps then rely on the FEAT_ARTIST field to be filled.
Apparently this is no way for you - although I still think it would be easiest.
I also supplied a way to compare strings - perhaps you find inspiration there.
And also there is a huge thread with more than 100 posts that deals mainly with the shifting around of featuring artists - you already had a look at it:
It removes the second artist from the artist tag and places it in FEAT_ARTIST:
I will have another look at the rest of your suggestions to see if I can get this working correctly.
I find it strange that there are two fields though, with one being artist (Maroon 5) and artists being artists (Maroon 5/Gwen Stefani). I don't think I have ever noticed that before. Should I leave it alone or is there a change that Itunes or Windows Media Player/Groove will move the tracks around the Music directory/not show albums where I expect if I don't set it to the main artist?
I also need to figure out a way to stop the script from running beyond removing the second, third etc artist from the artist tag when the filename is already correct:
ARTISTS is definitely a user-defined field that you may have created due to a typo - or whatever. Unless you have a special purpose for the data in that field (like you have now for the user-defined field FEAT_ARTIST) you can safely delete it.
This also applies to FEAT_ARTIST when you have transferred the featured artist to the field where you want to have that name.
If in the future you want to get the featured artist back to be moved some other field, it is advisable to have a unique separator between the (I guess) title and the featured artist name.
I personally use <& Name> which is 2 characters shorter than "feat." and does not pose the case problem if you have run a case conversion action afterwards.
The other way to tell v17 Kodi that "The Chainsmokers & Coldplay" is two artists is to use the ARTISTS tag with "The Chainsmokers / Coldplay". Kodi gives priority to the ARTISTS tag to identify individual artists, you could always add this tag to the file you get from itunes.
If you just tag with ARTIST = "The Chainsmokers & Coldplay", with no Musicbrainz Id tags, or ARTISTS (only v17 makes use of that) then Kodi will create an artist called "The Chainsmokers & Coldplay". But of course it will be unable to find any art or additional info for this artist.
It still remains a user-defined field.
If KODI found that workaround ... other programs use "semicolon blank" in the standard field ARTIST, ALBUMARTIST and COMPOSER to separate participating artists... others ignore that and also user-defined fields.
Some programs may cope with multi-value fields (iTunes does).
As I said:
Do not use the \ in a format value action as this may lead to multi-value fields.
I doubt that the $replace() is actually the correct way as you left out the value that should be used instead of that what is found.
Also I think that you got the order the wrong way round: you use data from TITLE for _FILENAME that is not there yet as the "formatting" for TITLE is the step after dealing with _FILENAME
To add a string to a field use a syntax like this:
Format value for TITLE
Format string: %title% feat. %feat_artist%
If the string in title is correct we should have a look at the filename.
It has made me wonder though if there is a way to make it work when the Artist tag differs from the Albumartist tag to include any name in those instances.
In the screenshot above, there is a track where it says the artist is Adam Levine. If you run the rule on that file, it changes the filename to Lost Stars (feat. ), So ideally, if the Artist tag is blank, it does not amend the filename or title, but if there is an artist which differs from the albumartist it includes it.
Album Artist is Maroon 5. Artist is Adam Levine. How do we introduce a check of the two fields and insert Artist name if different to Album Artist name into the featuring part? Once this has been done, it should change the Artist to the Album Artist.
You can recycle the $IF() from the filter:
would become part of the format value action for FEAT_ARTIST:
Format string: $if($eql(%artist%,%albumartist%),%feat_artist%,%artist%)
I would spare me another comparison of ALBUMARTIST and ARTIST as by now it should be clear that ALBUMARTIST and ARTIST should always show the same (and if they don't - "take this") so simply add an action of the type "Format value" for ARTIST
Format string: %albumartist%