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: File Operation File name Pattern: use album artist only when it contains a value (Read 1904 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

File Operation File name Pattern: use album artist only when it contains a value

Hi,
I have tried the title formatting help but being not so tech savy I couldn't figure it out.

Is it possible to create a pattern that only creates an sub directory for album artist when the field is actually filled ?
With the following line it creates the folder every time and when the album artist field is empty it uses the artist value:

Musik/%Genre%/%album artist%/%Artist%/%date% %Album%/%track% $left(%title%,35)

Thanks in advance
Alex

Re: File Operation File name Pattern: use album artist only when it contains a value

Reply #1
Try this in its place:

Code: [Select]
$if2($meta(album artist),$meta(artist))

Edit, after reading your question again it's not entirely clear to me. Where do you want a subdirectory under? Under Artist? That makes little sense considering what album artist is used for. Or do you want to fully replace artist when album artist is present? Logically I would assume you're looking for this

Musik/%Genre%/$if2($meta(album artist),$meta(artist))/%date% %Album%/%track% $left(%title%,35)

But the way you ask it seems to be something like this:

Musik/%Genre%/$if($meta(album artist),$meta(artist)/$meta(album artist),$meta(artist))/%date% %Album%/%track% $left(%title%,35)

Re: File Operation File name Pattern: use album artist only when it contains a value

Reply #2
Thanks, but unfortunately it makes just the same, it creates a folder named after the artist when the album artist field is empty.

Re: File Operation File name Pattern: use album artist only when it contains a value

Reply #3
It seems I've edited and you didn't read it after the edit.

Re: File Operation File name Pattern: use album artist only when it contains a value

Reply #4
Ok I try to explain... I misused the album artist field in the past to "group" artists in facets and have tagged my 6000+ albums collection that way...
for example for all bands related to the brothers finn (crowded house, split enz, tim fin, neal finn etc) the album artist field is filled with "Finn". In that case I want the folder structure  Genre/Finn/Crowded House/1991 Woddface.
But with artists where the album artist is empty I want the structure   Genre/Fleetwood Mac/1988 Tango in the night. At the moment it is  Genre/Fleetwood Mac/Fleetwood Mac/1988 Tango in the night in that case.

Re: File Operation File name Pattern: use album artist only when it contains a value

Reply #5
Ok next try:

Code: [Select]
Musik/%Genre%/$if($meta(album artist),$meta(album artist)/$meta(artist),$meta(artist))/%date% %Album%/%track% $left(%title%,35)

This one is the same, but to be sure I've replaced the slash symbol with an equivalent since I'm not sure how it's treated inside a function:
Code: [Select]
Musik/%Genre%/$if($meta(album artist),$meta(album artist)$char(47)$meta(artist),$meta(artist))/%date% %Album%/%track% $left(%title%,35)

Re: File Operation File name Pattern: use album artist only when it contains a value

Reply #6
Both work.
Thank you very, very much.

Re: File Operation File name Pattern: use album artist only when it contains a value

Reply #7
I misused the album artist field in the past to "group" artists in facets and have tagged my 6000+ albums collection that way...
"misused", intentionally - you want to keep it that way?
And, all of those which do not have the ALBUM ARTIST tag do have ARTIST - and consistent over each album?

Consider the following:
%album artist% - with percent signs - defaults to ARTIST if ALBUM ARTIST is missing (and then to composer and performer).
%track artist% is empty unless there are ARTIST and ALBUM ARTIST and they differ.
So if you use
Musik/%album artist%[/%track artist%]/
then you will get album artist and track artist if both are present, and otherwise it will default to just the artist because ALBUM ARTIST is missing.

What this does NOT give you, is if you indeed want "duplicate" somewhere.
Example: Suppose that the "Finn" brothers started a project named simply "Finn" (not Neil Finn solo, but just "Finn"). Would you then want the following with double Finn?
Genre/Finn/Finn/2018 NowYouNeedToReconsiderYourTags

But if you instead want just a single Finn for that case, Genre/Finn/2018 NowYouNeedToReconsiderYourTags , then the above is the easy way.

 

Re: File Operation File name Pattern: use album artist only when it contains a value

Reply #8
Ok next try:

Code: [Select]
Musik/%Genre%/$if($meta(album artist),$meta(album artist)/$meta(artist),$meta(artist))/%date% %Album%/%track% $left(%title%,35)

This one is the same, but to be sure I've replaced the slash symbol with an equivalent since I'm not sure how it's treated inside a function:
Code: [Select]
Musik/%Genre%/$if($meta(album artist),$meta(album artist)$char(47)$meta(artist),$meta(artist))/%date% %Album%/%track% $left(%title%,35)

A shorter version:
Code: [Select]
Musik/%Genre%['/'$meta(album artist%)]/$meta(artist)/%date% %album%/%track% $left(%title%,35)
I'm late