Repository for neat file name string patterns and tagger script snippets

Hi @rdswift I’ve had a read through this topic and a look at your tagging script, and it looks fantastic. I can use it to improve my tagging significantly. Thank you for the hard work.

As I frequently come over different releases of a certain album, I would like to differentiate them on the file system. I currently do that with something like this: “$if(%label%, (%label%),) $if(%catalognumber%, (%catalognumber%),)” which simply adds (label) and/or (catalognumber), which is enough to do what I want.

Would there be a way to implement this in your script? I might be able to put it in myself, but if you could spare a bit of time and add it, if you see it useful, I would be very happy. I understand that this might not be interesting for everybody, so it might be interesting to add it over a user setting.

Nevertheless, even without that I will manage. Thank you for the script, and making it available to everyone.

Probably, but I have a couple of questions…

First, where in the naming string would you like the information added? I assume right after the album name?

Second, how would you like it shown when there are multiple labels and/or catalogue numbers on a release?

Nice!

(1) I have now something like (YEAR) (ALBUM NAME) (LABEL) (CATALOGNUMBER) for example something like “(1982) Moving Target (Arista) (AL 9606)” for https://musicbrainz.org/release/31ff30da-c97f-4da8-89c5-53c339cd2965 - but I’m flexible on that. I have seen that you use [YEAR], so [LABEL] for example would look better.
(2) I thought that releases are unique based on a label/catalog number combo? In Picard, I right click an album and select from the other versions menu a certain label-catno combination. Thought that was unique. Although I also thought about having format in it, or even go one step further and create a directory with the album name and having all different version in that directory. But that makes it reall complicated.

So far, it was enough to use label/album.

Thank you for looking into this!

That’s just a simple matter of changing the bracket used in that part of the script. You can set it to use whatever you like.

A release record can (and occasionally does) have 2 or more labels, each with their own catalogue number. An example is:

That’s why I was asking.

1 Like

Ah, understood. Never seen that before. Strange that an album with different label and catalogue number still is considered the same release. I would have expected it to show up as a separate release to pick. Obviously, that was a naive thought :slight_smile:

In that case, I see 3 possibilities:

  1. Put in the 1st/2nd/… (just a choice I suppose, I guess 1st is OK)
  2. Put in all (likely to get too long)
  3. Put in a placeholder (“multiple labels”) and let the person do it by hand

I suppose that it will not happen that frequently, so I think (3) might be best. What would you suggest yourself?

Thank you

2 posts were split to a new topic: Dealing with multiple releases of a single album

Hello again @rdswift long time no annoy…

Is there a way to force a release to be treated as a Standard album, and not anything else (single, soundtrack, etc? Hoping for something similar to the way we can force a release to be treated as “Classical” with that simple script that sets the Classical processing flag…

That would require two changes. In the main script, after the line:

$set(_nAlbumType,$if2(%_nAlbumType%,Standard))

insert the line:

$if(%_ForceType%,$set(_nAlbumType,%_ForceType%),)

Then you will need to create a one-line script as:

$set(_ForceType,Standard)

Enable this new one-line script to force the processing to use the “Standard” formatting settings.

Note that this is untested code, so it may need to be tweaked slightly to work as desired.

1 Like

I tried this, and it worked exactly as desired. Just for kicks I tested a script force it as a “Single” and it worked as well. This is excellent! Thanks so much! :smiley: :smiley: :smiley:

3 Likes

@rdswift & @arielreyes001,
Just a suggestion on the use of these control variables in your scripts. I’ve found it makes it easier to remove the underscore so they’re saved in the tags.

For example: $set(ForceType,Standard)

Also, instead of enabling the one line scripts, I just right-click the release in the right pane and run the script manually.

This way, you can set the variable once and it’s saved to the tags. Then if you run your collection through Picard to update the tags, the variable is already set and you don’t have to remember which releases you want to get the special handling.

4 Likes

Good suggestion. Thanks.

EDIT: Note that tags set in the naming script are not written to the files, so for them to be included they will need to be set in a tagger script. My current naming script includes code to automatically determine the naming format to use (except for Classical), so this portion would need to be extracted and moved to a tagger script in order to have the tag saved.

Also an excellent suggestion. That’s actually the way I do it now.

Note: For anyone wanting to do it this way, you need to right click on the release (as @Billy_Yank stated), because if you right-click on a track the script will only be run against that track.

1 Like

@rdswift & @Billy_Yank

These are great suggestions, I’m learning so much.

I did try removing the underscore, which did save the variable to the tag, but then the script did not work correctly. The release was no longer forced as the type I chose. I went back and removed the underscore.

I would love to be able set it once and not have to keep doing it but I don’t mind if there’s no other way. Which portion of the script would need to be extracted? Would you then, have to delete it from the naming script so that it only appears in the taggers script?

It sounds like you only removed the underscore from the script that you use to set the format type, but not in the naming script itself. In the one-line script(s) that set the formatting type, the underscore should be removed, for example as:

$set(ForceType,Standard)

Then you need to remove the underscore from the line in the naming script so that it reads:

$if(%ForceType%,$set(_nAlbumType,%ForceType%)

Also note that you can change ForceType to something else (in both scripts) if you want the information saved to a different tag name. For example, you might prefer it to be saved to a tag named FormatType instead.

haha! That is exactly what I did, I never changed the underscore inside the naming script itself. I just tested it, and it worked. This is wonderful!

Is there a way I can do that with other tags? For example, there is a Spanish artist (Juan Luis Guerra y 4.40) who’s artist name tag varies slightly depending on release (you can see the variations at that link under the artist column). I have this tagger script I am running manually when I process his releases:

$set(albumartist,Juan Luis Guerra y 4.40)

As long as I run that on all those releases they will all be saved consistently. Is there a way to write the script or save it so that I don’t have to keep doing that every time I run those releases through Picard, the same way as this last suggestion you guys gave?

For this, you should be able to just set the “Use standardized artists” option in Picard and it should always return a consistent result. No plugins or scripting required.

1 Like

Wow, that’s what that means? lol. When I first started using the software i un-ticked it because I had understood it to mean something else. WOW. All these years… Thanks again @rdswift!!

2 Likes

@tdiaz I’ve been finding your script very useful. Would you consider posting your most recent?

Any suggestions on how to get full release date?
I’d like to rename every album folder with this format [YYYY.MM.DD] AlbumTitle but I can’t seem to understand how to do it.

To get it into that format (with dots instead of dashes), you could probably do something like:

[$replace(%date%,-,.)] %album%

You could get the earliest release date by using %originaldate% rather than %date%. See Tags and Scripting for more information.

2 Likes

Thanks! I was placing the %date% at the wrong place, now it works!

1 Like