# Filter to distinguish between multiple & single artists

**URL:** <https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162>\
**Category:** Support\
**Created:** [February 21, 2023, 8:11pm UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162 "2023-02-21T20:11:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)\
**Post date:** [February 21, 2023, 8:11pm UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/1 "2023-02-21T20:11:55Z")

</div>

Hello Everyone,

Please, I need your assistance again to build a filter I can not figure out:

The filter(s) is required for the %artist% field. The filter should list either same artist albums, or various artists albums.

Thank you.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [February 21, 2023, 8:16pm UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/2 "2023-02-21T20:16:51Z")

</div>

If this filter is supposed to compare 2 files whether they have the same data in ALBUM but different in ARTIST then that won't be possible.  
MP3tag cannot compare the contents of 2 files.

You would have to store the data somewhere that is shared by all the files of that album.  
E.g. you could filter first for all the tracks with  
TRACK IS 1  
then rename the directory so that it has  
`%album% - %artist%`  
and then you filter for all the files which do not have the ARTIST name in the \_DRIECTORY.  
For these, you assign "Various Artists".  
Finally, you filter for files with TRACK =2 and ALBUMARTIST=Various artists and assign a new folder name with %album% - Various Artists.  
And now you filter for files with TRACK=1 and \_DIRECTORY HAS Various.  
For those files you also set Various artists.

---

<div class="post-metadata">

**Author:** ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)\
**Post date:** [February 21, 2023, 9:18pm UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/3 "2023-02-21T21:18:40Z")

</div>

Thank you, @ohrenkino. I'm not sure whether I follow, though. There are albums where the %albumartist% field is populated by the string "Various Artists", and the %artist% field by different artists. There are more such albums, where the %albumartist% field is empty, and sometimes, if not empty, they are incorrectly named. Although I know how to find the albums that already have the string "Various Artists" in the %albumartist% field, my aim is to isolate those albums in which this field is empty, and to rename it to "Various Artists", too. However, when I search for those albums with an empty %albumartist% field, the search also turns in same artist albums where the %albumartist% field is also empty. So, I want to be able to at least find multiple artist albums some way or the other, and not same artist albums -- or just the other way around. Is it impossible to achieve through filters?

---

<div class="post-metadata">

**Author:** ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)\
**Post date:** [February 21, 2023, 9:23pm UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/4 "2023-02-21T21:23:43Z")

</div>

Perhaps for some of these albums you have also flagged the `COMPILATION` field with a 1? If you filter for files that have this, and do not have the `ALBUMARTIST` field set to "Various Artists" you can make those changes.

But as @ohrenkino has already confirmed, mp3tag does not compare files, so there is no way to filter for tracks that do not have `ALBUMARTIST` filled in AND `ARTIST` is not the same for each unique `ALBUM` in the list.

---

<div class="post-metadata">

**Author:** ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)\
**Post date:** [February 21, 2023, 9:50pm UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/5 "2023-02-21T21:50:17Z")

</div>

Thank you, I hope to revisit this topic again, later.

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [February 22, 2023, 6:04am UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/6 "2023-02-22T06:04:32Z")

</div>

> [@ragtag](#):
>
> There are albums where the %albumartist% field is populated by the string "Various Artists", ...

Those albums would then already be rated as OK.

My basic idea is: save the ALBUMARTIST of the 1st file to the folder as the folder can be seen by all the files from that album.  
Then compare that name in the folder with all the other files (which means then ones with track number greater 1) and see if it matches. If it does not, then it is most likely that this album is a compilation.  
Once you have set the correct albumartist for the compilations, the only file that still does not fit is the first one.  
So now, save the new albumartist to the folder which means that now ARTIST will not find a match in the folder name if the albumartist is "Various" or something.  
And for those files you can set the albumartist just all the other files in the folder.

You have to save the criteria that should be compared somewhere where all files individually can "see" that information.  
In this case it would be the folder name which is the same for all files from an album.

---

<div class="post-metadata">

**Author:** ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)\
**Post date:** [February 22, 2023, 1:04pm UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/7 "2023-02-22T13:04:34Z")

</div>

Thank you, @ohrenkino and @MotleyG, for your input. I'm going to stay my original course, by sorting them manually, as I did before. Just for interest’s sake, I am using this filter (a portion of which @ohrenkino will recognise as his) to catch the albums in which the field ALBUMARTIST has to be renamed to reflect "Various Artists":

`%album% MATCHES "\(CD\s\d+\^\d+\)" AND NOT %albumartist% HAS various AND %albumartist% MISSING`

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [February 22, 2023, 2:45pm UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/8 "2023-02-22T14:45:43Z")

</div>

do you really get all the hits that you intend or should it be  
`%album% MATCHES "\(CD\s\d+\^\d+\)" AND (NOT %albumartist% HAS various OR %albumartist% MISSING)`

---

<div class="post-metadata">

**Author:** ![ragtag](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ragtag/32/13146_2.png) [@ragtag](https://community.mp3tag.de/u/ragtag)\
**Post date:** [February 23, 2023, 10:39am UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/9 "2023-02-23T10:39:41Z")

</div>

Consistently masterful. It did score more hits, thank you, @ohrenkino.

Later, my Mp3tag Help Doc search did not turn up a direct reference to the use of brackets (parentheses) in the syntax, but it did locate this very interesting conversation to keep close at hand:

[Difference between OR/AND in Filter expressions](https://community.mp3tag.de/t/difference-between-or-and-in-filter-expressions/58023?page=1)

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [March 25, 2023, 10:40am UTC](https://community.mp3tag.de/t/filter-to-distinguish-between-multiple-single-artists/60162/10 "2023-03-25T10:40:35Z")

</div>

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