# Adding Genres (not replacing)

**URL:** https://community.mp3tag.de/t/adding-genres-not-replacing/12473
**Category:** Support
**Created:** [September 3, 2011, 3:31pm UTC](https://community.mp3tag.de/t/adding-genres-not-replacing/12473 "2011-09-03T15:31:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![bthoem](https://community.mp3tag.de/user_avatar/community.mp3tag.de/bthoem/32/12816_2.png) [@bthoem](https://community.mp3tag.de/u/bthoem)
#### Post date: [September 3, 2011, 3:31pm UTC](https://community.mp3tag.de/t/adding-genres-not-replacing/12473/1 "2011-09-03T15:31:43Z")

</div>

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

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [September 3, 2011, 3:44pm UTC](https://community.mp3tag.de/t/adding-genres-not-replacing/12473/2 "2011-09-03T15:44:49Z")

</div>

> [@Bjørn Tore Hoem](#):
>
> ... Add genre - keeping the existing genres (one, none or several). ...

Beside this ...  
[Actions](https://community.mp3tag.de/t/967/5)  
... 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

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [September 3, 2011, 3:49pm UTC](https://community.mp3tag.de/t/adding-genres-not-replacing/12473/3 "2011-09-03T15:49:17Z")

</div>

> [@Bjørn Tore Hoem](#):
>
> 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).

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 genre`

---

<div class="post-metadata">

### Author: ![bthoem](https://community.mp3tag.de/user_avatar/community.mp3tag.de/bthoem/32/12816_2.png) [@bthoem](https://community.mp3tag.de/u/bthoem)
#### Post date: [September 3, 2011, 6:16pm UTC](https://community.mp3tag.de/t/adding-genres-not-replacing/12473/4 "2011-09-03T18:16:02Z")

</div>

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

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [September 4, 2011, 6:03am UTC](https://community.mp3tag.de/t/adding-genres-not-replacing/12473/5 "2011-09-04T06:03:08Z")

</div>

> [@Bjørn Tore Hoem](#):
>
> ... 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? ...

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

---

<div class="post-metadata">

### Author: ![bthoem](https://community.mp3tag.de/user_avatar/community.mp3tag.de/bthoem/32/12816_2.png) [@bthoem](https://community.mp3tag.de/u/bthoem)
#### Post date: [September 4, 2011, 12:25pm UTC](https://community.mp3tag.de/t/adding-genres-not-replacing/12473/6 "2011-09-04T12:25:16Z")

</div>

Excellent support - thank you so much!

Bjørn Tore

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:23pm UTC](https://community.mp3tag.de/t/adding-genres-not-replacing/12473/7 "2026-02-09T12:23:19Z")

</div>


