Is it possible to have picard only tag the disc numbers of an album if there is more than one disc?
thanks for the help.
Is it possible to have picard only tag the disc numbers of an album if there is more than one disc?
thanks for the help.
Maybe with this script:
Disc number only on multi-disc releases
Use the following snippet to insert the disc number in the new path if the release contains more than 1 medium.
$if($gt(%totaldiscs%,1),Disc $num(%discnumber%,2))
Source: https://picard.musicbrainz.org/docs/scripting/#file_naming_examples
That wonât remove the tag though, just change the file naming (though @Smeele would probably want that too).
You could try adding $if($eq(%totaldiscs%,1),$unset(discnumber))
to Options â Options⌠â Advanced â Scripting. I think that should work, but let me know if it doesnât.
didnât work unfortunately.
If you tell us what exactly do you need, maybe we can help you.
a) Do you talk about tags (inside your music files) only?
b) Do you talk about file naming (visible in file explorer or file system)?
It would be helpful, if you would give us an example what do you expect as result.
I just tested it here, and the disc number is removed on my end. Though the tag itself is still displayed in my music player because it is a standard mp3 tag (the tag itself is empty). In addition to @InvisibleMan78âs questions, what is the file type of the files you are tagging?
Hey guys, I booted my computer up to today and tried again and it is working now! Iâm not sure why that needed to happen as I tried restarting the program and refreshing the releases to no avail. Anyway itâs all good now thanks for the help.
Also just for the record yes I was asking in regards to tagger script. As for file naming script I actually could use some help recreating my formatting script from foobar.
this is what I am trying to recreate in musicbrainz. I would like it so that if there isnât an album artist it becomes artist, and if there isnât an original year value it becomes year (only 4 digits).
/%album artist%/â(â$cut(%originalyear%,4)â)â %album%/[%discnumber%].%tracknumber%. %Title%
Could this be the Picard default, without having to script anything?
Doesnât it seem normal behaviour, adding a disc number and total discs only when more than 1?
I can also just change how foobar2000 displays them to not display them when total discs == disc number == 1
, though.
Isnât such a script already there at the beginning? As far as I remember, this was always the default behaviour, even before I started writing scripts myself.
Iâve just used Picard for tagging a 1 CD release, for the first time in years, with version 2.12, without any scripts, and it has added â1.â prefix to all my track numbers.
I have a related issue which is an example of the same problem. For a single disc CD, I encode to flac and the âDisc numberâ tag is empty. This is correct. If I then tag it with Picard (2.13), Disc number is set to 1. How can I get Picard to leave Disc number blank if the data from MB = 1, but if its > 1, then set it?
My encoding system cuetools supports discnumber this way and it would be helpful if Picard behaved the same.
Adding discnumber to the preserve list doesnât work either. It gets set to 1.
Thanks
dpr
Have a look at the $delete() command. I think a tagger script like the following might do what you want (untested code):
$if($lt($if2(%totaldiscs%,1),2),$delete(totaldiscs)$delete(discnumber))
Thanks. It probably will work⌠However:
Unclear why âpreserve tag listâ doesnât preserve an empty value. I am sure you understand that the empty / null value is a value. Preserve should leave it alone! The consequence of it not is shown here - Preserve also the empty tags. @leeuniverse had to create 15 scripts!..
As @jesus2099 indicates, the behaviour seems to have changed. Other applications such as cuetools have an empty value if the number of discs is 1, then track number generation in the format discnumber_tracknumber doesnât prepend _ and create unattractive track numbers.I think @jesus was expecting this kind of behaviour. I was - this is how cuetools works. It would be great if they were consistent.
as commented above.. âThis all should have been easierâŚâ
No, this is explicitly not how the preserve tags function is supposed to work. It will keep existing values, but add new data if there is no existing data.
You can clear the disc number with a script if wanted. It is easy to clear the tag if needed. If the disc number would be unset by default there would be no easy way to add it back. Also it would break any script that checks whether the disc number is exactly 1.
The tag is there, but has no value. In my view, it should be preserved.
The behaviour you describe would more accurately called âAdd Missing Tagsâ and then thereâs âOverwrite Existing Tagsâ for when existing tags are overwrittenâŚ
Preserve means donât change.
Inconsistent with other tools such as Cuetools.
Piard actually doesnât make this distinction. If you clear the value of a tag in Picard it wonât get written to the file. Indeed, if the tag had a value before and you clear it in Picard it will be marked for deletion.
Not everyone uses cuetools. Picard doesnât claim to write tags exactly how cuetools does. And thatâs fine, Picard is a very flexible tool, you can configure it to write the tags as you want.
If you just donât want Picard to set the tag use:
$if($lt($if2(%totaldiscs%,1),2),$unset(totaldiscs)$unset(discnumber))
This will leave any existing tags alone. If you want to remove any existing tag, use $delete
as in rdswiftâs answer.
Hereâs my example. Three screenshots. 0.before, 1. preserve discnumber 2, after saving.
In this example, discnumber is overwritten, even though it is in the preserve tags list.
Why is discnumber overwritten?
âPreserve tagsâ keeps any value of the tag, but thereâs nothing there. The tag was empty, therefore a value was added. Empty tags are neither written nor kept by Picard. Thatâs the way Picard works.
EDIT: Use case: I like to keep my own genres, therefore I preserve the genre tag, but if I start with newly ripped files, I want to add the automatically fetched genres as a starting point. After I decided which genres to discard and which to alter, my selection will be retained in future updates.
âPreserve tagsâ keeps any value of the tag, but thereâs nothing there. The tag was empty,
The tag exists and therefore should be left unchanged. The fact that it is empty is not relevant.
(This is another instance of the eternal computer science debate)
therefore a value was added. Empty tags are neither written nor kept by Picard.
The value of the tag was changed from empty to 1.As the tag name is listed in the âpreserve listâ, it should not have been changed.
Thatâs the way Picard works.
I believe it shouldnât work this way.
How can I get Picard to leave Disc number blank if the data from MB = 1, but if its > 1, then set it?
Have you tried the script posted above?