1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-07-07 04:19:25 +02:00

Fix formatting

Abzie 2017-02-09 17:22:44 +00:00
parent a7da1f6ce6
commit 29db638b01

@ -1,12 +1,15 @@
**This article can be removed when [Mass Delete](http://feathub.com/Radarr/Radarr/+3) is implemented** **This article can be removed when [Mass Delete](http://feathub.com/Radarr/Radarr/+3) is implemented**
For those who need to remove a lot of movie entries from radarr after they have finished downloading to their preferred quality. At the moment this can either be done via the API, or a lot of clicking on the webui. Bash 3.0+ required. First, pull the list of movies with GET: For those who need to remove a lot of movie entries from radarr after they have finished downloading to their preferred quality. At the moment this can either be done via the API, or a lot of clicking on the webui. Bash 3.0+ required. First, pull the list of movies with GET:
`curl https://example.com/radarr/api/movie -X GET -H 'X-Api-Key: xxxxxxxxx' -k > api.txt` `curl https://example.com/radarr/api/movie -X GET -H 'X-Api-Key: xxxxxxxxx' -k > api.txt`
This will create api.txt and enter the json response, where you can browse at your leisure. Use sed to whittle down the list: This will create api.txt and enter the json response, where you can browse at your leisure. Use sed to whittle down the list:
`sed -i -e '/"id"/!d' api.txt` `sed -i -e '/"id"/!d' api.txt`
The first indented column is the main id that radarr uses, the other indented id's are irrelevent: The first indented column is the main id that radarr uses, the other indented id's are irrelevent:
``` `
api.txt api.txt
"id": 4 "id": 4
"id": 7 "id": 7
@ -16,18 +19,22 @@ api.txt
So, id's 4, 68 and 93 are the id's required for the next step. So, id's 4, 68 and 93 are the id's required for the next step.
--
Oneshot example: Oneshot example:
`for i in 4 68 93; do curl https://example.com/radarr/api/movie/$i -X DELETE -H 'X-Api-Key: xxxxxxxxx' -k; done` `for i in 4 68 93; do curl https://example.com/radarr/api/movie/$i -X DELETE -H 'X-Api-Key: xxxxxxxxx' -k; done`
Usage: Usage:
example.com - your url/hostname where radarr is served from * example.com - your url/hostname where radarr is served from
X-Api-Key - Your API key found from `https://example.com/radarr/settings/general` * X-Api-Key - Your API key found from `https://example.com/radarr/settings/general`
You can manually enter id's as {x..X}: You can manually enter id's as {x..X}:
`for i in {x..X}; do curl https://example.com/radarr/api/movie/$i -X DELETE -H 'X-Api-Key: xxxxxxxxx' -k; done` `for i in {x..X}; do curl https://example.com/radarr/api/movie/$i -X DELETE -H 'X-Api-Key: xxxxxxxxx' -k; done`
Usage: Usage:
x - first id in series * x - first id in series
X - last id in series * X - last id in series
This will remove all movies with id's from the start to the end of the series. This will remove all movies with id's from the start to the end of the series.