diff --git a/docs/Configuration.md b/docs/Configuration.md index bd8e47b8..6d370df0 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -124,7 +124,7 @@ Use your Emby server URL directly. Maintainerr supports either entering an API k ## Seerr -Seerr configuration is required if you want to use Seerr-related rule parameters or remove Seerr requests. +Seerr configuration is required if you want to use Seerr-related rule parameters, remove Seerr requests, or see who requested media in pre-deletion notifications. | Setting | Description | | ------- | ------------------------------------------------------------- | diff --git a/docs/Notifications.md b/docs/Notifications.md index e3409a48..ac529198 100644 --- a/docs/Notifications.md +++ b/docs/Notifications.md @@ -37,17 +37,21 @@ Each notification agent requires the following common settings: Maintainerr supports several notification types that you can enable for each agent: -| Type | Description | -| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| Media Added to Collection | Sent when media items are added to a collection | -| Media Removed from Collection | Sent when media items are removed from a collection | -| Media About to be Handled | Advance warning that media will be processed/deleted in X days | -| Media Handled | Confirmation that media has been processed/deleted | -| Rule Handling Failed | Alert when there's an error processing rules | -| Collection Handling Failed | Alert when there's an error processing collections. When Maintainerr can tie the failure to one collection, the message names that collection. | +| Type | Description | +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| Media Added to Collection | Sent when media items are added to a collection | +| Media Removed from Collection | Sent when media items are removed from a collection | +| Media About to be Handled | Advance warning that media will be processed/deleted in X days. When Seerr is configured, the message also names the requester (see note below). | +| Media Handled | Confirmation that media has been processed/deleted | +| Rule Handling Failed | Alert when there's an error processing rules | +| Collection Handling Failed | Alert when there's an error processing collections. When Maintainerr can tie the failure to one collection, the message names that collection. | Infrastructure-level collection failures that happen before Maintainerr can identify a specific collection still send the generic `Collection Handling Failed` message. +:::note Seerr requester in pre-deletion warnings +When Seerr (Overseerr or Jellyseerr) is configured, the **Media About to be Handled** message includes who requested the item — for example: _'Some Title' (requested by alice) will be handled in 3 days_. The lookup is season-aware for TV content and best-effort by design: if Seerr is unreachable or the item was not requested through Seerr, the requester line is silently omitted and the warning is still sent. +::: + ## Supported Notification Agents ### Discord @@ -213,7 +217,26 @@ The webhook agent supports variable replacement in the JSON payload. You can use | `{{subject}}` | The notification subject/title | | `{{message}}` | The notification message content | | `{{image}}` | Associated image URL (if available) | -| `{{extra}}` | Additional data fields | +| `{{extra}}` | Additional data fields (see below) | + +The `{{extra}}` block is also flattened into the top-level webhook payload as individual keys. The fields present depend on the notification type: + +| Extra key | Type | Description | +| ---------------- | ------ | ----------------------------------------------------------- | +| `collectionName` | string | Name of the collection that triggered the notification | +| `dayAmount` | number | Days until the item is handled (`null` when not applicable) | +| `mediaItems` | string | Stringified JSON array of media items (see example below) | + +Example `mediaItems` value for a **Media About to be Handled** notification when Seerr is configured: + +```json +[ + { "mediaServerId": "abc123", "requestedBy": ["alice"] }, + { "mediaServerId": "def456" } +] +``` + +Each entry contains `mediaServerId`. The optional `requestedBy` array lists the Seerr usernames who requested the item; it is omitted when Seerr is not configured or the item was not requested there. Example JSON payload: