[X] Special chars in tags retrieved from Amazon or freedb cause invalid filenames

Today I encountered the following issue:

I retrieved tags from Amazon for an album that had a song named something like "first/second.mp3". Since my own filenames for that album weren't right, I executed "rename files from tags". During that process, mp3tag created a subfolder named "first" and inside a file named "second.mp3".

While this is not exactly dangerous, I can't think of a scenario where this would be intended. Also, there may be other special chars coming from external sources containg more undesired chars for file naming. Maybe mp3tag should consider these chars when executing something like renaming from tags.

Greetings from Radebeul,

The / is a valid character in Windows.
If you are not sure whether your filenames will end up with valid characters, use the $validate() function for the whole filename.
If you have more special characters that you want to replace with a special (other) character, uste the $replace() function for that piece of data.

Also see the FAQs on the Convert function and the possibility to create folder structures:

I would say: no bug.

Thank you very much for your reply.

Good to know that I can handle these cases with special functions during renaming, I didn't know that yet.

Nevertheless, the bug report was merely referring the default behaviour of the renaming process when renaming files from tags that were retrieved from online sources. By default, characters that lead to something else than a single valid filename (no folders etc.) are allowed.

From a safety and usefulness point of view I'd reverse that behaviour to disallow these characters when renaming from tags (replace or exclude them). If someone would not like to have these chars replaced or excluded, then he/she might use a function to keep them.

Imagine renaming a lot of album tracks through freedb or Amazon: you never know what kind of track names might come back. So right now I'd basically have to validate them all.

If you check that carefully:

A title by the group AC/DC leads to a filename component
as does AC\DC
also AC:DC leads to ACDC
by default.
I cannot see that this causes any invalid file- oder folder names.

Hmmmm, I cannot confirm that (I'm using mp3tag 2.81).

The steps I took:

  1. added the album to mp3tag
  2. tag sources -> amazon.com
  3. selected the correct album -> next -> ok
  4. convert -> tag - filename
  5. used default format string "$num(%track%,2) - %title%"
  6. saved

After that, the file "40 Years Back Come.mp3" was renamed using the tag title "40 Years Back/Come", resulting a folder "40 Years Back" containing a file "Come.mp3".

Have you updated to 2.81? (your signature says: no)
Because in the change log (http://www.mp3tag.de/en/changelog.html) you find:

[2016-11-29] FIX: converter 'Tag - Filename' treated paths that were built from field values
containing slash characters as relative.

I'm pretty sure I was using 2.81, but I will verify that at home tonight (I'm at my office right now) and post a confirmation reply here.

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