Custom script

Any questions? Need some help?
Post Reply
darkvinill
Posts: 15
Joined: 23 Feb 2018, 23:35

Custom script

Post by darkvinill »

Hi, I'm using amc to process my files, movies & TV Shows are in {plex} format, and I'm using :

Code: Select all

--def exec="php cli.php filebot amcOnExec {quote fn} {quote file} {quote json}"
But there's a problem, I was expecting {quote fn} to return original file name but it is returning the new one.

Also --def exec= is being called for each file, even Unsorted ones. Is it possible to run "exec=...." only on successfully processed files ?
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Custom script

Post by rednoah »

{fn} is the current file name. {original} will give you the original file name. You can use {type} to check the info object type, and then do different things depending on the value.
:idea: Please read the FAQ and How to Request Help.
darkvinill
Posts: 15
Joined: 23 Feb 2018, 23:35

Re: Custom script

Post by darkvinill »

I think you should update this page :
https://www.filebot.net/naming.html

{fn} says it's the "original filename" and there is nothing about {type} or {original}. (it would be nice to have a column called "Valid values")
Ex: {type} Valid values : Episode || Movie || Unsorted (?)
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Custom script

Post by rednoah »

You can use the built-in documentation Image while prototyping your format expression.

The best way to prototype expression is to have a couple of test files and test it on them. That way you'll see how you format works for various files.

You can use the Format Editor to prototype your --def exec expression.
:idea: Please read the FAQ and How to Request Help.
Post Reply