Difference between revisions of "Radaar"
From Indie IT Wiki
Plittlefield (talk | contribs) |
Plittlefield (talk | contribs) |
||
Line 36: | Line 36: | ||
=== Find and Delete Movie === | === Find and Delete Movie === | ||
+ | |||
+ | With no BASH variable ... | ||
ID=$(curl -X "GET" "<nowiki>http://192.168.0.252:7878/api/v3/movie</nowiki>" -H "accept: application/json" -H "X-Api-Key: 9f4229b5056e4d24a2471dc49af8b77c" | jq '.[] | select(.path=="/data/media/movies/Movie Name (Year)") | .id'); echo "${ID}"; curl -X "DELETE" "<nowiki>http://192.168.0.252:7878/api/v3/movie/${ID}?deleteFiles=true&addImportExclusion=false</nowiki>" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx" | ID=$(curl -X "GET" "<nowiki>http://192.168.0.252:7878/api/v3/movie</nowiki>" -H "accept: application/json" -H "X-Api-Key: 9f4229b5056e4d24a2471dc49af8b77c" | jq '.[] | select(.path=="/data/media/movies/Movie Name (Year)") | .id'); echo "${ID}"; curl -X "DELETE" "<nowiki>http://192.168.0.252:7878/api/v3/movie/${ID}?deleteFiles=true&addImportExclusion=false</nowiki>" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx" | ||
+ | |||
+ | With a BASH variable ... | ||
+ | |||
+ | MOVIEPATH="/data/media/movies/Movie Name (Year)"; ID=$(curl -X "GET" "<nowiki>http://192.168.0.252:7878/api/v3/movie</nowiki>" -H "accept: application/json" -H "X-Api-Key: 9f4229b5056e4d24a2471dc49af8b77c" | jq --arg MOVIEPATH "$MOVIEPATH" '.[] | select(.path==$MOVIEPATH) | .id'); echo "${ID}"; curl -X "DELETE" "<nowiki>http://192.168.0.252:7878/api/v3/movie/${ID}?deleteFiles=true&addImportExclusion=false</nowiki>" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx" | ||
=== Use in Tdarr === | === Use in Tdarr === |
Revision as of 16:42, 2 November 2024
Introduction
Radarr is an independent fork of Sonarr reworked for automatic downloading of movies.
Installation
https://github.com/Radarr/Radarr/wiki/Installation
Information
API
List Movies
curl -X "GET" "http://192.168.0.252:7878/api/v3/movie" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx"
curl -X "GET" "http://192.168.0.252:7878/api/v3/movie" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx" | jq '.[] | .path'
Search Movie
curl -X "GET" "http://192.168.0.252:7878/api/v3/movie" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx" | jq '.[] | select(.path=="/data/media/movies/Movie Name (Year)")'
Find ID of Movie
curl -X "GET" "http://192.168.0.252:7878/api/v3/movie" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx" | jq '.[] | select(.path=="/data/media/movies/Movie Name (Year)") | {Id: .id}'
curl -X "GET" "http://192.168.0.252:7878/api/v3/movie" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx" | jq '.[] | select(.path=="/data/media/movies/Movie Name (Year)") | .id'
Delete Movie
curl -X "DELETE" "http://192.168.0.252:7878/api/v3/movie/886?deleteFiles=true&addImportExclusion=false" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx"
Find and Delete Movie
With no BASH variable ...
ID=$(curl -X "GET" "http://192.168.0.252:7878/api/v3/movie" -H "accept: application/json" -H "X-Api-Key: 9f4229b5056e4d24a2471dc49af8b77c" | jq '.[] | select(.path=="/data/media/movies/Movie Name (Year)") | .id'); echo "${ID}"; curl -X "DELETE" "http://192.168.0.252:7878/api/v3/movie/${ID}?deleteFiles=true&addImportExclusion=false" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx"
With a BASH variable ...
MOVIEPATH="/data/media/movies/Movie Name (Year)"; ID=$(curl -X "GET" "http://192.168.0.252:7878/api/v3/movie" -H "accept: application/json" -H "X-Api-Key: 9f4229b5056e4d24a2471dc49af8b77c" | jq --arg MOVIEPATH "$MOVIEPATH" '.[] | select(.path==$MOVIEPATH) | .id'); echo "${ID}"; curl -X "DELETE" "http://192.168.0.252:7878/api/v3/movie/${ID}?deleteFiles=true&addImportExclusion=false" -H "accept: application/json" -H "X-Api-Key: xxxxxxxxxxxxxxxxxxxxxxxx"
Use in Tdarr
So, in theory, you should be able to use the variable "{{{args.inputFileObj._id}}}"
in Tdarr to get the path and then right at the end of your flow, you call this command. Maybe :)