Page 1 of 1

Special characters with CLI

Posted: 05 Jan 2016, 18:43
by Sheldon
Hi,

I try to rename a file called "Morgen.hoer.ich.auf.S01E01.mkv" using the CLI but it fails.
With the option "-non-strict" the result is the same.

if I change the filename to"Morgen.hör.ich.auf.S01E01.mkv" it works fine and I receive
"Morgen hör' ich auf - 01 - 01 - Schöner Schein.mkv".

So it seems to be related to the special characters like ä, ö, ü, ß. replaced by ae, oe, ue, ss.
How can I handle them with the CLI?

Via the GUI the matching works fine with the first unchanged filename.
I would like to do a simular matching using the CLI.

Kind regards,

Sheldon

Re: Special characters with CLI

Posted: 06 Jan 2016, 06:25
by rednoah
You can force the query with the --q option:

Code: Select all

--q "Morgen hör' ich auf"
Alternatively, you can add "Morgen hoer ich auf" as alias series name on TheTVDB.

Re: Special characters with CLI

Posted: 06 Jan 2016, 12:44
by Sheldon
Ok! Thanks, I managed it.

But I have an additional problem with some signs
Sometimes the episode title contains signs like "?" or ":".
They are not allowed in the file name so the renaming fails.

My format string is
format := "{n} - {s.pad(2)} - {e.pad(2)} - {t}"
Can I somehow remove these signs in the format like this?
format := "{n} - {s.pad(2)} - {e.pad(2)} - {t.revoveAll(/\?/).revoveAll(/:/)}"

Re: Special characters with CLI

Posted: 06 Jan 2016, 12:52
by rednoah
FileBot automatically removes illegal characters from the filename before renaming. You can of course get rid or replace those characters in the format. There's many many many examples here in the forums that do just that.

Re: Special characters with CLI

Posted: 06 Jan 2016, 13:07
by Sheldon
I did a search in the forum and according to what I found in my example case it should be this

t.replaceAll(/[?]:/)

So the format would be

format := "{n} - {s.pad(2)} - {e.pad(2)} - {t.replaceAll(/[?]:/)}".

Is this correct?