How to force a language on rename?

Any questions? Need some help?
Post Reply
WoJ
Posts: 2
Joined: 01 Apr 2016, 07:38

How to force a language on rename?

Post by WoJ »

Hello,

Right before discovering Filebot I used another (inferior :)) renamer and made the huge mistake to trust it blindly. What happened is that it renamed my movies in English, eben though some were in French (and had a 'FRENCH' tag).

I re-run these movies though Filebot and AMC and the result is fantastic, except that I (obviously) still have the English titles everywhere.

Is there a way to 'hint' filebot (via, say, a tag in the name of the file, or some metadata) to rename to a localized name (and search relevant information in that locale, if possible)? I would then go though the list of the files and manually input that 'hint', then run filebot and AMC again.

Thank you for any pointers!
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to force a language on rename?

Post by rednoah »

Dynamic localization based on filename tokens:

Code: Select all

{any{localize[fn.match(/French|German/)].name}{n}}
You'll need the latest RC though, because the localize binding was added recently:
viewtopic.php?f=7&t=1609
:idea: Please read the FAQ and How to Request Help.
WoJ
Posts: 2
Joined: 01 Apr 2016, 07:38

Re: How to force a language on rename?

Post by WoJ »

rednoah wrote:Dynamic localization based on filename tokens:

Code: Select all

{any{localize[fn.match(/French|German/)].name}{n}}
Thank you. Would you know in which geenral area of AMC I should look at to include this code (https://github.com/filebot/scripts/blob ... amc.groovy) ?

I will try to figure out the rest but since this is my first contact with filebot (and also the fact that I speak Python and not groovy) any pointer would be great.
Ztrust
Posts: 69
Joined: 21 Dec 2013, 17:04

Re: How to force a language on rename?

Post by Ztrust »

unless im mistaken this goes in your format name
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to force a language on rename?

Post by rednoah »

1.
I will never ever recommend that you modify the code. ;)

I gave you a snipped that you want to include in your format expression:
http://www.filebot.net/naming.html

Use the GUI Format Editor and play with it until you understand how it works.


2.
Alternatively, you can also call the amc script on only the french files with --lang fre and then again for all the non-french files. On Linux you can easily do that with find command.
:idea: Please read the FAQ and How to Request Help.
Post Reply