This commit is contained in:
+15
-1
@@ -341,8 +341,22 @@ async def maintainarr_webhook(request: Request, background_tasks: BackgroundTask
|
||||
print(f"INFO: Received Maintainarr webhook: {webhook.notification_type}")
|
||||
print(f"DEBUG: Full Maintainarr webhook payload: {payload}")
|
||||
|
||||
# Only process media removal notifications
|
||||
# Handle test notifications differently for debugging
|
||||
notification_type = webhook.notification_type or ""
|
||||
if notification_type == "TEST_NOTIFICATION":
|
||||
return {
|
||||
"status": "test_received",
|
||||
"message": "Test notification received successfully",
|
||||
"available_fields": {
|
||||
"notification_type": webhook.notification_type,
|
||||
"subject": webhook.subject,
|
||||
"message": webhook.message,
|
||||
"extra": webhook.extra
|
||||
},
|
||||
"debug": "This is a test notification. Real media removal events will be processed when they occur."
|
||||
}
|
||||
|
||||
# Only process media removal notifications
|
||||
if "removed" not in notification_type.lower() and "delete" not in notification_type.lower():
|
||||
return {"status": "ignored", "reason": f"Notification type '{notification_type}' not processed"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user