Skip to content

Commit

Permalink
radarr: fix indentation on method
Browse files Browse the repository at this point in the history
  • Loading branch information
mattburchett committed May 26, 2023
1 parent c1c71ff commit 0de505b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/radarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ def get_ids(self, titles):

return ids

def delete_movies(self, ids):
for movie_id in ids:
print(f"Deleting movie with ID: {movie_id}")

def delete_movies(self, ids):
for movie_id in ids:
print(f"Deleting movie with ID: {movie_id}")
radarr_url = f"{self.base_url}/api/v3/movie/{movie_id}?deleteFiles=true&apikey={self.api_key}"
headers = {"User-Agent": "Housekeeper"}

radarr_url = f"{self.base_url}/api/v3/movie/{movie_id}?deleteFiles=true&apikey={self.api_key}"
headers = {"User-Agent": "Housekeeper"}

response = requests.delete(radarr_url, headers=headers)
if response.status_code != 200:
raise ValueError(f"Failed to delete movie with ID: {movie_id}")
response = requests.delete(radarr_url, headers=headers)
if response.status_code != 200:
raise ValueError(f"Failed to delete movie with ID: {movie_id}")

0 comments on commit 0de505b

Please sign in to comment.