Adding Genres (not replacing)


#1

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


#2

Beside this ...
Actions
... 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.

DD.20110903.1945.CEST


#3

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

Comments:

', '

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

Attention:
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


add 1 more GENRE tag?
#4

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


#5

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'))

DD.20110904.1050.CEST


#6

Excellent support - thank you so much!

Bjørn Tore