Need help with script to set DJ-Mixer tag conditionally

F

frankvw2019

Guest
Picard scripting keeps confounding me.
:weary:
Can someone explain to me how to do the following? What I want to do is this:

If the “Release Type” tag contains both ‘dj-mix’ and ‘compilation’, and the Album Artist tag is not “Various Artists”, then the DJ-Mixer tag must be set to whatever the “Album Artist” tag is.

E.g.:

Album Artist: John Doe
Release Type: album; compilation
/* Do not set DJ-Mixer tag */

Album Artist: Various Artists
Release Type: album / compilation / dj-mix
/* Do not set DJ-Mixer tag */

Album Artist: Tom Dick’n’harry
Release Type: album / compilation / dj-mix
/* Set DJ-Mixer to Album Artist, i.e. Tom Dick’n’harry */

Note that the ‘Release Type’ contains multiple tags that in Picard show as either being separated by ’ / ’ (space-slash-space) or by '; ’ (semicolon-space) which may or may not be relevant in script syntax.

So far I have:

Code:
$if(
  $and(
    $and(
      $inmulti(%releasetype%,compilation),
      $inmulti(%releasetype%,dj-mix)
    ),
    $not($eq(%albumartist%,Various Artists))
  ),$set(%djmixer%,%albumartist%)
)

But that doesn’t work. I also tried using $lower() to make comparisons case-insensitive, but that doesn’t work either. (I’d prefer case-insensitivity.)

What am I missing? All suggestions appreciated!

// FvW

2 posts - 2 participants

Read full topic

Continue reading...
 
Top