Genre and Grouping


#1

Hello,
I would to add a ‘grouping’ tag but I can’t manage to make it work.
The deal is:
If the genre is ‘Christian & Gospel’ than grouping will be ‘Gospel’.
I tried
$if($eq(%genre%,Christian & Gospel), $set(grouping,Gospel))
but nothing happens.
If you can handle this pease help me. Thank you!


#2

I think instead of $eq, you need $inmulti. If I’m remembering correctly, genre is a multi-value variable.

$if($inmulti(%genre%,Christian & Gospel), $set(grouping,Gospel))


#3

Hi Billy.
I tried this before because the one with %releasetype% works, but not this one with %genre%.


#4

Don’t you want
$set(grouping, $if($eq(%genre%,Christian & Gospel),Gospel))
?


#5

Nope… It doesn’t work http://imgur.com/a/F7zSc
I have some other scripting running, but nothing that affects Genre.


#6

Maybe this
$if($in(%releasetype%,soundtrack), $set(grouping,Soundtrack))
can exclude another grouping genre?


#7

What happens if you try running only this script? I remember a couple times in the past I was getting lines that seemingly did nothing due to an error earlier or in another script, but it’s been long enough that I’ve forgotten how that came about without Picard making it obvious. Don’t forget that there may be multiple separate script “pages” running but hidden if the list to the left of the editor has disappeared.

Beyond that, I’m not entirely sure what would be wrong. My first thoughts were issues with case sensitivity, but that doesn’t look to be the case either.


#8

I tried @MetaTunes suggestion and it works perfectly here (Picard 1.4.2 on Windows 7). I dropped it into a separate script and enabled it and it worked as expected. You might want to try adding a test value to grouping in case the $eq() test fails in order to see if that’s the problem. Something like:

$set(grouping, $if($eq(%genre%,Christian & Gospel),Gospel,No Match))

You might also want to check that you’re not removing tags in another script. If all else fails, perhaps the log (with debug turned on) will help shed some light on why it’s not working for you.


#9

I tried to remove everything but it’s not working…

With:
$set(grouping, $if($eq(%genre%,Christian & Gospel),Gospel,No Match))

I have ‘No match’ as result.
It’s like it doesn’t recognize ‘Christian & Gospel’


#10

Try the following:

$set(group_test,%genre%)

and see what is displayed for the “group_test” tag. I’m wondering if it’s something silly like the ampersand being saved as & which would subsequently fail the match. If that’s the case, try:

$set(grouping, $if($rsearch(%genre%,Christian.*Gospel),Gospel,No Match))

That should match “Christian” and “Gospel” separated by anything (or nothing).


#11

Nothing happened.
I tried to manually rename Christian & Gospel to Gospel and this:
$set(grouping, $if($eq(%genre%,Gospel),Gospel))
but still it doesn’t work.
I also insalled again Picard with no success


#12

Do you mean that it didn’t create a tag named group_test containing the same information as the Genre tag? If that’s the case, there is definitely something wrong. Are you using the Keep tags plugin? What does the log (with debug turned on) say?

Sorry, but I’m out of suggestions. Like I say, it all works perfectly here.


#13

So… I re installed picard again removing every folders.
I left only $set(group_test,%genre%) in scripting but I don’t see any group_test unfortunately.
I attach here a pic with debug. I usually some plugins to rename files (like feat. in the title) but never Keep Tags.


Thx for your patience!


#14

Did you scroll all the way down to the bottom of the tag list to check for the new tags? I couldn’t tell from your screen shot. If you haven’t already, you might want to consider installing and enabling the View script variables plug-in. This allows you to right-click on a track and display all the script variables associated with that track. I find it quite helpful here for development and debugging.

Also, the plugins you normally have enabled regarding featured artists shouldn’t have any impact on this, so you should be safe in re-enabling them.

Finally, what operating system are you using when running Picard? It shouldn’t make a difference, but I’m just curious. I have experience with both Windows and Linux, but none with Mac.


#15

I checked every tag but there isn’t any 'group_test’
I installed the plugin.
I attach you the result.
I use Windows 10.


#16

This may sound like a strange question, but do you have the script enabled (the box checked next to the script name)?


#17

It’s enabled but in the ‘Plugins’ section


#18

I don’t understand how you have a tagging script enabled in the plugins section. Can you provide a screen shot? I suspect that’s why none of this is working for you. We’ve all been providing scripts to use in the scripting section.


#19

This is the Scripting section


And this is the plugins:


#20

Sorry, I misunderstood. I thought you were saying that the scripting was enabled in the plugins, when you meant that the View Scrip Variables plugin was enabled there.

On your scripting screen, put your mouse pointer near the left side of the pane showing the content of your script. This should show you a resizing handle. Drag that to the right and you should see a list of the user scripts you’ve entered and whether or not they are enabled (checked) similar to my screen shot above. It still looks to me like your script isn’t enabled.