Hi,
I can’t figure out how to count the total files in a album folder and set that value.
My folder structure is:
Music ==> Artist A ==>Album A
In folder “Album A” are all tracks of the album stored (not a subfolder/disc)
How can I set the total value from all tracks in that folder?
For example if I have a folder “Album A” :
disc 1: 20 files
disc 2: 10 files
= 30 files in that folder
I want to set the value 30 in all tracks from that folder.
Grrrtttzzz
I don’t think that’s possible. At least not by script.
Each file is processed separately and you can only get information which belongs to the file (the track).
Disc 2 files only have the disc number and the number of files on disc 2 but no information about the number of disc 1 files. I don’t see a chance to get the offset for numbering.
What’s wrong with numbering 1-01 to 1-20 and 2-01 to 2-10?
1 Like
I’m pretty sure you could do something with the Persistent Variables plugin.
2 Likes
I have not noticed this plugin. Didn’t work for me so far, but will be great when it works.
Hi all,
thank for the feedback.
I don’t think that’s possible. At least not by script.
Each file is processed separately and you can only get information which belongs to the file (the track).
Disc 2 files only have the disc number and the number of files on disc 2 but no information about the number of disc 1 files. I don’t see a chance to get the offset for numbering.
What’s wrong with numbering 1-01 to 1-20 and 2-01 to 2-10?
There are people that like there music tagged in 1-30 –>30/30
In my case I keep the original numbering
My goal is next:
-Is my album is complete or not and do this in bulk.
-also without renumbering the track field (takes a manual handling to trigger trackwizard in mp3tag + script)
-without looking up the release up here in musicbrainz. (just load tracks and then execute a script)
The total amount of tracks for the release,that data i have already in mp3 tag.
I am able to retrieve the total folder files in mp3tag.
But this only possible at release level and not in bulk.
So my hope was to get the total files in the album folder here in musicbrainz..
Why I keep staring to the value 30 total tracks of a release?
This is the only way to flag the whole release and not 1 disc of the 2 in the release.
My plan B was allready:
I’m pretty sure you could do something with the Persistent Variables plugin.
When searching this forum I had read a few times that your script is able to renumber tracks and get the total there.
At the moment I allready run 3 plugins, run more plugins = slow down musicbrainz.
But I don’t have another option.
So I better take a look in that direction and proceed better in the topic there when I run in something.
thnx
You have to look deeper and follow the link to github.
# Persistent Variables \[[Download](https://github.com/rdswift/picard-plugins/raw/2.0_RDS_Plugins/plugins/persistent_variables/persistent_variables.zip)\]
## Overview
This plugin provides the ability to store and retrieve script variables that persist across tracks and albums. This allows things like finding and storing the earliest recording date of all of the tracks on an album.
There are two types of persistent variables maintained - album variables and session variables. Album variables persist across all tracks on an album. Each album's information is stored separately, and is reset when the album is refreshed. The information is cleared when an album is removed. Session variables persist across all albums and tracks, and are cleared when Picard is shut down or restarted.
## Scripting Functions Added
This plugin adds eight new scripting functions to allow management of persistent script variables:
### $set_a(name,value)
Sets the album persistent variable `name` to `value`.
### $unset_a(name)
Unsets the album persistent variable `name`.
This file has been truncated. show original
there is a description of the variables that comes with this plugin
1 Like
$set_a(_tracknum,$if2($add($get_a(_tracknum),1),1))
$num($get_a(_tracknum),2) $if(%_multiartist%,%artist% - ,)%title%
This is a very simple approach. The tracks are numbered in succession. But it requires a complete album. Otherwise it will close gaps.
I know and that is the point
In mp3tag I have already the total tracks when album is complete…
the plugin count the actual files and serve to verify if the total tracks in mp3tag are equal with those from the plugin
if i miss a track the plugin gives 29, mp3tag 30….
the plugin write 1/29-29/29, I grab the last 2 digits 29.
I don’tt need the tracknumber but only the amount of the total tracks
In mp3tag I can count too, but first i have to move the original tracknumber to a diffrend field in 1e script.
then I have to trigger manual that counter.
verify in 2e script and move original tracknumber back to it’s original field and delete the temperaly field
Here I can do this with 1 script and put the counted files in a tempfield witch deleted itselve when saving and unload the files