Help creating/adding tags if not present in files

taggerscript
Tags: #<Tag:0x00007f07693785a8>

#1

Hey guys.
Scripting noobie but tried to figure it on my own but failed.
I’m trying to create a scheme for my music library and have been trying to figure out which tags I find useful and wish to have in all of my files.
There is the pretty basic ones like artist, track name etc. Where my problem lies is e.g. ISRC and Producer.
I wanna to populate all files that doesn’t have the tags. Kind of; make tag if not present.

Let’s say I know that all my files have

  1. an ISRC, but Picard only found it for a few of the files. The field is supported by Picard and it has the ID3v2 frame name TSRC.

  2. a Producer, and same as above ex. the ID3v23 name is IPLS:producer,

Last is it possible to leave the value of the newly created tags as none (i.e. it has a value but it is blank) or should I give it some other value which I can run a search for to manually add the correct value later.

p.s. is there a plugin or site that would let me test my scripts and preview the results before making them active in Picard. Maybe even a place to learn how to do proper scripting, so I would be able to do this kind of stuff by myself and not bother others to help me out?

Thank you so much for spending your time reading all of this and hopefully maybe even being able to help me out


#2

I think I don’t really understand your goal. Picard already will write the ISRC and producer tags to the files, no need for scripting.

I cases where it does not find this data, you could manually add the tags before saving. But where would you get the data from? If you would like to set some default value you could probably do something like:

$set(isrc,$if2(%isrc%,NONE))

This will leave the isrc tag if it is filled, but set it to NONE if it is empty.