Adding Genres (not replacing)

Hi - I was planning on adding some tags to genre on a number of albums, in order to easily be able to select and choose between my 24 bit and 16 bits albums.

Can this be achieved with a script in MP3Tag?

Add genre - keeping the existing genres (one, none or several).

Thank you,

Bjørn TOre

Beside this ...
... there is also the possibility to create a multi value GENRE tag-field, using the action "Format value" on the tag-field GENRE with a Formatstring containig values, which are separated by the "Double Slash" separator, e. g. 'Rock\\Trash'.

Use the dialog "Extended Tag View..." to display all tag-fields with their content.


Action: Format Value
Field: GENRE
Formatstring: $if(%genre%,%genre%', ',)new genre

', '
this is the seperator between the old and the new genre. You can replace it by '; ' or '/' or whatever you like. Thanks to the $if function, it is only written when there is already a genre.

new genre
you may have guessed it, you should replace this by the name of your new genre

If you are multivalue tags for GENRE (displayed as genre 1\\genre2\\genre 3 in Mp3tag), you have to use this:
Formatstring: $if(%genre%,$meta_sep(genre,\\)'\\',)\\new genre

Hi - and thank you so much for your kind help.

I have tested and it seems to work perfectly!

If the tag to add to genre is "24 bit" - is there a way to avoid double tagging, if this keyword already exists in the Genre-field?

Bjørn Tore

You can apply the Mp3tag Filter with the Filter expression:
NOT GENRE HAS "24 bit"

If you want to hard code the different cases into Mp3tag Scripting Language, then you may use this proposals ...

For GENRE as single value ...
$ifgreater($strstr(%GENRE%,'24 bit'),0,'do nothing','do something')

For GENRE as multi value ...
$ifgreater($strstr($meta(GENRE),'24 bit'),0,'do nothing','do something')

Detect, whether a tag-field is a multi value tag-field or not ...
$if($neql($meta(GENRE,1),),'IsMeta is TRUE','IsMeta is FALSE')

Combined ...

$if($neql($meta(GENRE,1),),$ifgreater($strstr($meta(GENRE),'24 bit'),0,'do nothing','do something'),$ifgreater($strstr(%GENRE%,'24 bit'),0,'do nothing','do something'))


Excellent support - thank you so much!

Bjørn Tore