Special characters with CLI

Any questions? Need some help?
Post Reply
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Special characters with CLI

Post 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
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Special characters with CLI

Post 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.
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Special characters with CLI

Post 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(/:/)}"
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Special characters with CLI

Post 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.
:idea: Please read the FAQ and How to Request Help.
User avatar
Sheldon
Posts: 188
Joined: 14 Apr 2014, 14:39

Re: Special characters with CLI

Post 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?
Post Reply