AMC: Truncate file name before matching?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
politby
Posts: 14
Joined: 09 Jul 2016, 08:10

AMC: Truncate file name before matching?

Post by politby »

My apologies if this is already covered somewhere else but I have searched all over and not found a solution.

I record movies from TV resulting in file names of the format (example)

Code: Select all

Diktatorn-SVT2 HD-2200-20160708.ts
consisting of the movie title followed by channel name and time stamp. This works great with matching against themovieDB when the title is in the original language but in case of the title translated into Swedish such as in the example above of Chaplin's "The Dictator" matching fails.

However if I strip off everything but the title from the file name and let FileBot search for just "Diktatorn" I get a match. How can I add a filter to strip off everything after and including the first hyphen before matching? AMC command string below:

Code: Select all

filebot -script fn:amc --output "F:/ServerFolders/filebot/movies" --action move  -non-strict "F:/ServerFolders/Recordings" --log-file "F:/ServerFolders/filebot/movies/amc.log" --db TheMovieDB --lang sv  --def excludeList="F:/ServerFolders/filebot/movies/amc.txt" "movieFormat=V:/ServerFolders/Movies/{n} ({y})/{n} ({y})" "ut_label=Movie"
Using powershell or similar to change the file names before running FileBot won't work because it will mess up the recording database and episode matching.

Many thanks in advance
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: Truncate file name before matching?

Post by rednoah »

Feel free to suggest blacklisted terms:
viewtopic.php?f=3&t=359
:idea: Please read the FAQ and How to Request Help.
politby
Posts: 14
Joined: 09 Jul 2016, 08:10

Re: AMC: Truncate file name before matching?

Post by politby »

I guess I am a total noob but how does this help me? There is no pattern except that the unusable part of the file name starts with the first hyphen...
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: Truncate file name before matching?

Post by rednoah »

:idea: Please read the FAQ and How to Request Help.
Post Reply