Radarr icon indicating copy to clipboard operation
Radarr copied to clipboard

{radarr_movie_id} variable wont work in CURL

Open antigravity83 opened this issue 7 years ago • 5 comments

I have a post processing script that converts a recently downloaded AVI or MP4 to MKV, and I need Radarr to "RescanMovie" once the script has completed to make sure the correct extension appears in Radarr.

According to the WIKI, Post Processing Variables can be used in a CURL API command, and I'm trying to use {radarr_movie_id} to tell Radarr which movie to "RescanMovie".

Here is the CURL command that I'm trying to use:

curl -s http://localhost:XXXX/radarr/api/command&apikey=XXXX -d '{name: "RescanMovie", movieId: "${radarr_movie_id}"}' -H "Content-Type: application/json" -X POST

However I'm getting the following debug error in Radarr:

"message": "Could not convert string to integer: ${radarr_movie_id}

When I substitute the ${radarr_movie_id} variable with a hardcoded ID, it works fine. But the variable doesn't.

The error is stating that the variable isn't an integer. But shouldn't it be returning an integer?

Edit// fixed typo in CURL command.

antigravity83 avatar Feb 16 '19 11:02 antigravity83

We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please hop over onto our Discord or Subreddit

support avatar Feb 16 '19 13:02 support

You’re missing an opening bracket

galli-leo avatar Feb 16 '19 13:02 galli-leo

That was just a typo when typing it into GitHub. The bracket isn't the issue. See the debug error with the bracket included.

The command works when entering in a hardcoded ID, so the syntax etc is correct.

But it seems the Post Processing variable doesn't work as described in the wiki (where it says the radarr_movie_id variable can be used to populated an API command. )

antigravity83 avatar Feb 16 '19 13:02 antigravity83

@antigravity83 Ah i see now, you cannot use the double quotes, else it counts as a string

galli-leo avatar Feb 16 '19 14:02 galli-leo

Thank you, works perfectly now.

antigravity83 avatar Feb 16 '19 23:02 antigravity83