I am currently using these 4 rename patterns. Switching them in the settings is getting cumbersome. So I was wondering how I could combine them into a single pattern.
Given that the Singles are often enough (at least in theory) part of an album (the same might be true for compilations) it seems hard to separate them based on metadata. So I was wondering - maybe I could switch the rename expression depending on where the source file is?
If it’s in the Albums folder it will use the Albums pattern and so on.
I could not find how to do this yet though.
Or do you have other suggestions on automating the different patterns?
I use the primary and secondary releasetype tag contents to determine the naming format to use. This is all done automatically in my file naming script (available on GitHub).
Wow - that’s a pretty impressive but also complex script/format.
I guess the problem with _primaryreleasetype and _secondaryreleasetype is that what I call “singles” are also tracks where I don’t have the full album. So the metadata would show “album” but I want to treat them as “single”. As in “I don’t have the full album”.
I guess the track just doesn’t know if the album is completely available or not?
Not sure if there is a better way.
But I just found _dirname which might be allow for a work around.
The docs are just unclear on whether that is the absolute path?
Also - what defines the album? Let’s say there is no match on musicbrainz, the cluster/album is defined to have 13 tracks, all tracks are there - is $is_complete() true or not?
Is there a way to see where Picard would write a track to? without actually saving it?
The path in the bottom bar seems to show the source - but not the transformed filename.
The way I do it is by saving the output path information to a variable (tag starting with an underscore so it won’t be written to the file) and then inspecting the variables using the View Script Variables plugin.
Sorry, I think I may have misled you a little. The View Script Variables plugin will only show the variables set in user scripts (and not from the naming script). You would need to duplicate the file naming script in a user script (saving the output to a variable), but this still wouldn’t do exactly what you’re after because the $is_complete() function does not work in the user scripts.
What you might do is create a variable for each of the naming templates that you use, and then trust that the naming script will select the correct template.
It’s because it is trying to match EXACTLY what you have between the comma and the closing bracket, including any quotes, slashes and spaces. Then again, you didn’t say what you’re trying to match so I’m just guessing.