Skip to content

Commit

Permalink
fix error in deletion script
Browse files Browse the repository at this point in the history
  • Loading branch information
Amateur-God committed Feb 10, 2024
1 parent 7aef95f commit 460c9ea
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions EmbyArrSync.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@ def unmonitor_movies(radarr_id, monitored):
print(f"Error updating monitoring status for movie ID {radarr_id}: {response.status_code}")

def delete_item(item_id):
url = f"{EMBY_URL}/Items"
params = {'Ids': item_id, 'api_key': EMBY_API_KEY}
response = requests.delete(url, params=params)
if response.status_code == 200:
url = f"{EMBY_URL}/Items?{item_id}&api_key={EMBY_API_KEY}"
response = requests.delete(url)
if response.status_code == 204:
print(f"Item {item_id} deleted successfully from Emby.")
else:
print(f"Failed to delete item {item_id} from Emby: {response.status_code}, {response.text}")
Expand Down

0 comments on commit 460c9ea

Please sign in to comment.