Page 1 of 1

AMC just to get data

Posted: 26 Feb 2018, 08:39
by darkvinill
Hello. Is it possible to run a command like this:

// type may be "Tv", "movie" or "anime"

Code: Select all

filebot -script fn:amc --process --def exec="php path/to/cli.php titles import {type} {filePath} {json}"  "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
I just want it to pass all information to a script (php in this case) instead moving or renaming the file.
_________
Is it normal that "tmdbid" is undefined if the id is on series expression?
Image

Re: AMC just to get data

Posted: 26 Feb 2018, 10:32
by rednoah
Unfortunately, this particular use case is not supported.

The best course of action is probably to create hardlinks and then delete them later if you don't need them.

Depending on the available info, bindings may yield different values or not value at all. The {tmdbid} is only defined for movies.

Re: AMC just to get data

Posted: 26 Feb 2018, 10:55
by darkvinill
rednoah wrote: 26 Feb 2018, 10:32 Unfortunately, this particular use case is not supported.

The best course of action is probably to create hardlinks and then delete them later if you don't need them.
It would be nice to have documentation to write a script

Re: AMC just to get data

Posted: 27 Feb 2018, 10:27
by darkvinill
..... so I decided to adapt amc script to my needs.
https://pastebin.com/kMH8JbTB

and I execute filebot this way :

Code: Select all

filebot -script  /test.groovy  --def exec="php src/cli.php titles test \"{file}\" {json} "  "/my/media/folder"
But there is a problem. I can't escape {json}
https://pastebin.com/Na6nNfd2

Re: AMC just to get data

Posted: 27 Feb 2018, 10:41
by rednoah
The FileBot format expression environment does provide a built-in quote argument function:

Code: Select all

{quote json}