Adding support for iTunes' "Compilation" tag
I have a lot of Soundtracks with various artists on them. When I tagged them, instead of using a generic album artist like "Various Artists", I marked those albums with the "Compilation" tag from iTunes (I don't use iTunes, this was done with MusicBee for Windows, when I was still using that OS).
By doing so, tracks from different artists, but from the same album, will still get sorted by album. And this also works fine with other music players, like Tauon or the afformentioned MusicBee, for example.
But with fooyin, those albums are sorted by each individual artist, making it difficult to play those albums or show them properly in the library.
Therefore, could you please add support for the "Compilation" tag or maybe implement another method so that compilation albums with no album artist tag are displayed properly?
My library filter is currently set to Album Artist - Album For tracks that don't have an album artist, fooyin uses the Artist tag, instead of grouping those tracks by "Unknown artist" or something similar.
Here's a screenshot to better visualize my problem:
I hope I haven't overlooked a setting.
I've just looked into the compilation tag, and if I understand it correctly, there may be a way to handle this already.
Assuming the value of the tag is either 0 or 1 (if it exists), you could use something like the following in the title script of a custom preset (Settings->Playlist->Presets):
<b><sized=2>$ifequal(%compilation%,1,Various Artists,$if2(%albumartist%,Unknown Artist)) ▪ $if2(%album%,Unknown Album)
That will return Various Artists instead of the artist fallback for %albumartist%. Alternatively, you could remove the artist altogther for those tracks with something like:
<b><sized=2>$ifequal(%compilation%,1,,$if2(%albumartist%,Unknown Artist) ▪ )$if2(%album%,Unknown Album)
Edit: And you'll probably want to change the default library sort script in Settings->Library->Sorting as well. $meta(albumartist) will return the album artist tag without any fallbacks (which in this case will be empty).
Edit2: $META(albumartist) until I fix a regression.
Thank you for your reply. Your solution seems to work partially.
I'm using this code in Settings->Playlist->Presets
<b><sized=2>$ifequal(%compilation%,1,Various Artists,$if2(%albumartist%,Unknown Artist)) ▪ $if2(%album%,Unknown Album)
When I search for the album in my above comment, it's displayed correctly now:
However, it's not showing in my library filter under "Various Artists". Instead, the tracks are shown individually by their Artist tag instead:
I'm not quite sure where to put $META(albumartist) exactly, is this correct?
Because when I do this, fooyin keeps crashing when running Library->Reload tracks
For the library filter, you'll also want to change the script by adding a new column: $ifequal(%compilation%,1,Various Artists,%albumartist%.
For the sort, I mean just replacing the album artist:
$META(%albumartist%) - %year% - %album% - $num(%disc%,5) - $num(%track%,5) - %title%.
Or:
$ifequal(%compilation%,1,Various Artists,%albumartist% - %year% - %album% - $num(%disc%,5) - $num(%track%,5) - %title%
I'll look into the crashing issue.
I'm thinking it may also be ideal to add an optional setting to handle this automatically i.e. use Various Artists as a fallback for %albumartist% if the compilation tag is present.
Thank you for your help. With your new input, I've gotten better results, even though it's still not perfect. Some albums are still split by artist instead of being grouped together, and I also have some cases where an album has an album artist, but it's listed under "Various artists".
Here's one example:
I need to check if those albums have a compilation tag, even though there's also an album artist.
But I agree with you: A setting to handle these cases automatically would be the best solution.
With https://github.com/fooyin/fooyin/commit/a17765003036994a97a9f5d3ff91696589cda972, I've added an option under Settings->Library. If enabled, Various Artists will be used for the album artist if the album artist tag isn't present and the COMPILATION tag is set to 1.
Sounds good, I will give it a try, once a new version with that option has been released. In the meantime, I will revert the changes I've made manually to avoid any conflicts with that futre option.
Thank you!