Advertisement
filebot

refresh-radarr.groovy

Jun 16th, 2023 (edited)
2,571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.38 KB | Source Code | 0 0
  1. def host = '127.0.0.1'
  2. def port = 8310
  3. def auth = 'YOUR_API_KEY'
  4.  
  5.  
  6. def ids = model.findAll{ it.type =~ /Movie/ }.findResults{ it.tmdbId } as Set
  7.  
  8. ids.each{ id ->
  9.     def r = curl "http://${host}:${port}/api/v3/movie?tmdbId=${id}", 'X-Api-Key': auth
  10.     r.each{ m ->
  11.         curl "http://${host}:${port}/api/v3/command", [name: 'rescanMovie', movieId: m.id], 'X-Api-Key': auth
  12.     }
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement