AMC just to get data

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
darkvinill
Posts: 15
Joined: 23 Feb 2018, 23:35

AMC just to get data

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

Re: AMC just to get data

Post 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.
:idea: Please read the FAQ and How to Request Help.
darkvinill
Posts: 15
Joined: 23 Feb 2018, 23:35

Re: AMC just to get data

Post 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
darkvinill
Posts: 15
Joined: 23 Feb 2018, 23:35

Re: AMC just to get data

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

Re: AMC just to get data

Post by rednoah »

The FileBot format expression environment does provide a built-in quote argument function:

Code: Select all

{quote json}
:idea: Please read the FAQ and How to Request Help.
Post Reply