Genre and Grouping

It’s enabled. Poor me!

It’s like it’s not seeing the genre tag, which seems to be confirmed looking at your variables list screen shot above. On my system, I have the Use folksonomy tags as genre option enabled (see below). I wonder if that’s what’s making the difference?

Just tried and it didn’t work! I think I’m stuck! I will do it manually! Thx for you help

If I recall correctly (I cannot check currently), there is an option to use other’s people tags for the folksonomy. By default, it might only use your own tags. Have you tagged things on Musicbrainz? You might want to look for the option to use other people’s tags.

2 Likes

There ‘Use only my tag’ but I don’t have it checked.

Hello rd, While not “on topic” I have related question concerning file naming and scripting in the Options columns. I have 5 tagger scripts saved. To use one of these scripts do I just check the appropriate box and do nothing to the file naming box? To date, I have been deleting the script in the file naming box, then going back to scripting to copy the script I need and then pasting it into the file naming box.

Is this the way it is supposed to be used? Or am I just supposed to check the script box I wish to use without doing anything with the File Naming area? In the past, if I don’t replace the script in the File Naming tab, funky things happen.

I appreciate your help.

One of the things that I do here to provide different naming scripts for different situations (e.g.: Pop / Rock versus Classical) is to combine the various scripts in the naming script, and wrap each of them in an $if() function such as:

$if($eq(%_nametype%,pop),pop naming script goes here,)

or

$if($eq(%_nametype%,classical),classical naming script goes here,)

Then I just use a separate script to set the _nametype variable as

$set(_nametype,pop)

or

$set(_nametype,classical)

In most cases, I can set the naming type automatically based on some logic (e.g.:

$if($or($eq(%primaryreleasetype%,soundtrack),$eq(%secondaryreleasetype%,soundtrack)),$set(_nametype,soundtrack))

But I haven’t yet found the appropriate combination of logical tests to automatically determine when to use the classical naming script, thus the separate setting script.

An alternative, which is closer to the way you suggested is to keep your naming script very simple as:

$if(%_outputpath%,,$set(_outputpath,%albumartist% - %album%)
$if(%_outputname%,,$set(_outputname,%title%)
%_outputpath%/%_outputname%

and then have each of your five scripts set the values of _outputpath and _outputname accordingly. That way you could simply select the script you want to do the processing and avoid any copy ‘n’ pasting or editing of the scripts. Note that I included setting some very basic default values for _outputpath and _outputname just in case none of the processing scripts are selected and the values are blank.

In fact, I really like your suggestion and think I may modify my setup here to keep the different naming style scripts separate. It will make it a bit cleaner when editing one of the styles, and will avoid having a huge master script. Thanks for that.

The beauty is that there are a few different ways of achieving what you want, so I suggest that you pick one that you’re comfortable using and go with it.

That’s caught me on occasion too, but it’s usually because I haven’t taken into account the way the processing occurs within Picard. @dns_server explains the order in:

Things generally seem to work as expected if I do a refresh on the metadata from MusicBrainz (in the right-hand pane) after making any changes to scripts (including selecting / deselecting) and before performing the renaming.

3 Likes

I appreciate your info! Now I have a few things to chew on.

Llama lover

I hope this post is still fresh enough to bump, yet hopefully this might help other folks from going down the same rabbit hole as me.

Using multiple of the techniques tought from the gentlemen in the thread prior, I was able to get this working for my use case scenario by setting the “grouping” tag globally to 0 first and then set it based if genre matches a certain criiteria and if not set %grouping% back to 0. Wash, rince, repeat…
In the end if it doesn’t match any of my set criteria, then it will set %grouping% to %genre%

One nice thing about this method is that it only insert one string into the grouping tag, even if it fallbacks to using %genre% as the grouping. Another thing is that the grouping is added in the order you place the lines of the scripts.
So that when a tag matches multiple of your preset categories, it will set grouping as the first genre.

So for instance if I place the Rock code line before Country as in the code below, then any song that has a genre including both of those will be given a grouping of the first. Which is Rock in this case.

If anyone knows of a better method than setting %grouping% to 0 at the beginning of the script, I’d be happy to know.

In the meantime, this scripting works for me;

$set(grouping,0) 
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Ambient),Ambient,0)))                                                  
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Blues),Blues,0)))                          
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Classical Music),Classical Music,0)))      
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Comedy),Comedy,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Rock),Rock,0))) 
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Country),Country,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Dance),Dance,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Electronic),Electronic,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Experimental),Experimental,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Field Recordings),Field Recordings,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Folk),Folk,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Hip Hop),Hip Hop,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Industrial),Industrial,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Jazz),Jazz,0)))               
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Metal),Metal,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Musical Theatre and Entertainment),Musical Theatre and Entertainment,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,New Age),New Age,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Punk),Punk,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Pop),Pop,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Psychedelia),Psychedelia,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,RnB),RnB,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Reggae),Reggae,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Regional),Regional,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Singer/Songwriter),Singer/Songwriter,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Ska),Ska,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Sounds and Effects),Sounds and Effects,0)))
$if($inmulti(%grouping%,0), $set(grouping,$if($rsearch(%genre%,Spoken Word),Spoken Word,0)))
$if($inmulti(%grouping%,0), $set(grouping,%genre%))

In the OP’s case, this should work by using;

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