Appending to existing genres

The genre selection list only writes a single genre. If you want to add multiple genres this will need to be done manually. You can use the existing genre field and add to it using actions, but not much point if you need to spend as much time writing the action in the first place.

BTW - a comma isn’t generally the best solution for a delimiter as that character often appears in other tag fields. I suggest you might consider a more unique Unicode character as the separator, or at least the more traditionally used semicolon ; or forward slash / as a better choice.

The removal of duplicates has already been linked.
Here is a thread from the FAQs on how to append an existing field

You can also use a dedicated action combined with a filter.

Filtering for

NOT genre HAS "Rock"

would list all files which don't have "Rock" in the genre field. Then, applying an action Format tag field for field GENRE with [%genre%, ]Rock would append the genre "Rock" to a possible existing genre.

You can use two actions Replace for field GENRE with

  1. , Rock and
  2. Rock

replaced by nothing (equivalent to removing) to remove the genre "Rock" from a possibly comma-delimited list of genres.

1 Like

Thanks for the tip. How could I find and replace commas to say a semicolon? I'm confident none of my comma'd fields express a single genre.

There's a lot going on in the thread. Would I use (within the Action Groups section) "Replace with Regular Expression"? option?

I'm unsure how the list items thing was included in that thread. And how would I import the .mta file? I think that's the answer in the thread.

Yes, in the end you have to use that rather complicated regular expression that only remove duplicates.
So, if you do not have duplicates, then you don't have to dig into that thread.

To replace commas with semicoli, use an action of the type "Replace" (without regular expression)

I tried the expression in the final reply. Couldn't seem to notice it in a test? Do I need to supply a list?

Thanks!

To note, I also tried "Merge Duplicate Fields" and "Remove Duplicate Fields" from the Quick Actions. Not that I know what I'm doing ...

EDIT: I got "Replace" from Quick Actions to work though (ie. replacing commas to semicolons)

I found this thread regarding where .mta are stored in WIndows: How can I import .mta files into mp3tag?

Still trying to sort out for Mac!
EDIT: Realised I needed to update the progam. Looks like the .mta doesn't support semicolons ...

see the documentation for the Mac:

1 Like

So import works yet doesn't seem to actually remove duplicates (ensuring genres are comma delimitered).

I think I'm using it wrong because it needs a list of text to find duplicates?

Looks like you got this part figured out with @ohrenkino now.

1 Like

This only works when you are using multiple and separate fields for the same tag. In your example I believe you are using just one tag separating a list of genres with a comma or semicolon. So these actions don’t apply.

I see, so is there are a way to remove duplicates in a comma separated field?

I think that what was covered in the links above. You would have to change the separator to use the semicolon if you made that change to your genre tags already. But regex is not my strength, maybe one of the other users can help. But this is not a simple action using any of the defined tools.

OK, I managed to modify the aforementioned regex to work with semicolons by replacing the colons. It seems to work by only keep the last instance of the word (which is fine enough).

Thank you!

A post was split to a new topic: Save filters for continual reuse?

Solution for anyone reading this thread in the future:

  • Tags were converted to semicolons upon recommendation. Used "Replace" from Quick Actions, however this later (not first time) had issues for me because I drag and drop tracks from Music/iTunes
    -- I think this thread helped but will see if issue persists in the ftuture.
  • De-deduplicating genres seemes to leave the last one. I used the .mta from the thread linked above, modified for semicolons
  • "NOT genre HAS "Rock" filter was used as template to keep file browser clean as I manually edited tracks.
    -- Confirmed they can't be saved, as of now
  • Adding/appending tags to semicoloned list was done by creating an Action
    -- Select 'Format Tag Field', choose Genre, add genre of choice. I simply highlighted and selected desired tracks then applied action to add genre.

Thanks to ohrenkino, MotleyG and
Florian who promptly enlightened me!

P.S My only final issue is not undoing deleting track (from browser view) when finger becomes trigger happy?
EDIT: Unsure how to split posts/threads so made a new one!

Another update for anyone else who's stuck with the regex for deduplication:

Use this expression:
(?:(?<=,)|(?<=\A)) ?([^,]*),(?=.*?(?<=,) ?\1(?=,|\z))

  • By creating a new Replace With Regular Expression action.
  • Set Field to GENRE and leave Replace blank

This is the semicolon version that I'm using:
(?:(?<=;)|(?<=\A)) ?([^;]*);(?=.*?(?<=;) ?\1(?=;|\z))
I just manually replaced commas with semicolons!

.mta didn't work this time for some reason (recently reinstalled computer).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.