Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: %album artist% does not work as expected (Read 2138 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

%album artist% does not work as expected

So, here's the deal: Up until about a week ago, I had never used the %album artist% tag. I had manually tagged all soundtracks (OST) and various artist (VA) albums with my own custom tag called %compilation%. This tag was critical in my old playlist title formatting syntax which looked like this:

Code: [Select]
$if(%compilation%,%album% '/' %tracknumber% - %artist% - %title%,%artist% - $if(%album%,'('%date%')' %album% '/' %tracknumber% - ,)%title%)


This, depending on the presence of the %compilation% and %album% tags would make files look like this:

VA - Compilation / 01 - Artist - Title
OST - Soundtrack / 01 - Artist - Title
Artist - (Date) Album / 01 - Title
Artist - Single Track


The syntax for sorting my playlist looked like this:

Code: [Select]
$if(%compilation%, %album% [- %disc%] - %_filename%, %artist% - [%date% - ][%album% - ]%_filename%)


This made all OST and VA albums appear in the 'O' and 'V' sections of my playlist, with all artists albums and single files also sorted correctly around them.


I've gone over all my files, incorporating the %album artist% tag as either 'VA' or 'OST' depending on the type of compilation. I have tried altering my title formatting syntax to the following:

Code: [Select]
$if(%album artist%,%album artist% - %album% ['('Disc %discnumber%')' ]/ %tracknumber% - %artist% - %title%,%artist% - $if(%album%,'('%date%')' %album% '/' %tracknumber% - ,)%title%)


... simply replacing %compilation% with %album artist% at the beginning of the syntax. However, this doesn't work. It seems that the second part of the $if statement (single artist album) is never used, even though the %album artist% tag isn't present in my single artist albums.

I did the same to my sorting syntax, replacing %compilation% with %album artist%, and now that doesn't work properly either. There doesn't seem to be any system what-so-ever other than that single files are all being lumped in one place in the playlist.

So my challenge is this: Create a syntax for me (both title formatting and sorting) that will do the same as my previous ones, using the standard %album artist% tag instead of the non-standard %compilation% tag.

I will continue tampering with this to see what I can come up with. Hopefully some of you out there might be able to help. If there are any questions about the syntax or tags or whatever concerning my media library, I will answer as best I can.

%album artist% does not work as expected

Reply #1
According to the titleformat reference, %album artist% is defined as:

Code: [Select]
$if3($meta(album artist),$meta(artist),$meta(composer),$meta(performer))

This means that if there is no ALBUM ARTIST tag present, it falls back to ARTIST, then COMPOSER, and PERFORMER. Only if none of these fields are present, the resulting string will be empty and its boolean value false, causing the else-part of the $if-statement to be returned.

To check for the presence of the ALBUM ARTIST tag, use $meta_test(album artist) or $meta(album artist):

Code: [Select]
$if($meta_test(album artist),...,...)

%album artist% does not work as expected

Reply #2
Ah, thank you. This will help. Any advice on the sorting issue?



EDIT: Never mind. I got it working. Thanks again.