docker-filebot icon indicating copy to clipboard operation
docker-filebot copied to clipboard

Filebot WebHook

Open Housemann opened this issue 3 years ago • 4 comments

Hello thanks for the great container.

I have installed with "AMC_INSTALL_PKGS" the package "curl". I want to send me data via a webhook what filebot has renamed. Is it possible to do this? The Curl runs with --def exec="curl http://user:[email protected]:3777/hook/test", but how do I get values into it?

Regards

Housemann avatar Mar 04 '21 18:03 Housemann

You mean how to pass data to your webhook ? Do you know how it expects the data ?

jlesage avatar Mar 04 '21 19:03 jlesage

Exactly. how can i send the old and new filename to the webhook? something like this: http://user:[email protected]:3777/hook/test?OldFileName=OldMovieFile&NewFileName=NewMovieFile

Housemann avatar Mar 05 '21 05:03 Housemann

I am a little further. when i make this: --def exec="curl http://user:[email protected]:3777/hook/test?FilenameOriginal=""{original}" it works great. The Hook sends me My.First.Movie.1999 If i try this: --def exec="curl http://user:[email protected]:3777/hook/test?FilenameOriginal=""{original}""&FilenameNew=""{fn}" The Filebot log tells me: Bad exec value: curl http://user:[email protected]:3777/hook/test?FilenameOriginal=""{original}""&FilenameNew=""{fn}"

The execute statement in the Filebot log looks good. Execute: curl http://user:[email protected]:3777/hook/test?FilenameOriginal="My.First.Movie.1999"&FilenameNew="My First Movie (1999)" If is execute this in my browser, it works.

What is wrong?

Housemann avatar Mar 05 '21 06:03 Housemann

Here is the solution --def exec="curl -G -v "http://user:[email protected]:3777/hook/test" --data-urlencode "FileNameOriginal="{original}"" --data-urlencode "FileNameNew="{fn}"""

Housemann avatar Mar 05 '21 16:03 Housemann