Skip to content

feat(webhook): add imdbid to webhook notification#2658

Open
M0NsTeRRR wants to merge 1 commit intodevelopfrom
feat/add-imdb-webhook
Open

feat(webhook): add imdbid to webhook notification#2658
M0NsTeRRR wants to merge 1 commit intodevelopfrom
feat/add-imdb-webhook

Conversation

@M0NsTeRRR
Copy link
Member

@M0NsTeRRR M0NsTeRRR commented Mar 8, 2026

Description

How Has This Been Tested?

Screenshots / Logs (if applicable)

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Summary by CodeRabbit

  • New Features
    • Added IMDB ID template variable support for webhook notifications, enabling users to include media IMDB identifiers in custom webhook payloads.

Signed-off-by: Ludovic Ortega <ludovic.ortega@adminafk.fr>
@M0NsTeRRR M0NsTeRRR requested a review from a team as a code owner March 8, 2026 14:12
@coderabbitai
Copy link

coderabbitai bot commented Mar 8, 2026

📝 Walkthrough

Walkthrough

Added support for the {{media_imdbid}} template variable across documentation, backend webhook agent, and frontend UI component. This enables webhook payloads to include the IMDb ID for media items, allowing users to reference IMDb pages in their notification messages.

Changes

Cohort / File(s) Summary
IMDb ID Webhook Variable
docs/using-seerr/notifications/webhook.md, server/lib/notifications/agents/webhook.ts, src/components/Settings/Notifications/NotificationsWebhook/index.tsx
Added {{media_imdbid}} template variable support: documentation entry, backend KeyMap mapping of media_imdbid to media.imdbId, and frontend default payload example.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 bounces happily
The IMDb ID hops into place,
Three files joined in sync and grace,
Webhooks now link with ease,
Rabbit magic sure to please! 🎬

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely describes the main change: adding IMDb ID support to webhook notifications, which is the primary objective of this changeset.
Linked Issues check ✅ Passed The PR successfully implements the IMDb ID field requested in issue #2643, adding it to webhook documentation, backend mapping, and frontend payload as required.
Out of Scope Changes check ✅ Passed All changes are directly related to adding IMDb ID support to webhooks; no out-of-scope modifications are present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@server/lib/notifications/agents/webhook.ts`:
- Line 28: The template variable media_imdbid is populated only from
payload.media.imdbId, but Media.imdbId is optional and often empty at request
creation; update the notification-building path to ensure the IMDb ID is
resolved before dispatch: either populate payload.media.imdbId from available
request-time metadata (e.g., payload.metadata or request.mediaInfo) or
lookup/fallback to a reliable field (e.g., external_ids or metadata.imdb) when
constructing the webhook context, so media_imdbid is set; adjust the code that
assembles the webhook payload/template context (the place referencing
payload.media.imdbId) to perform this fallback/resolution synchronously prior to
sending.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dac9fd27-53a8-41a2-b65d-c5967e1a76b9

📥 Commits

Reviewing files that changed from the base of the PR and between ff4ab21 and 1228ae0.

📒 Files selected for processing (3)
  • docs/using-seerr/notifications/webhook.md
  • server/lib/notifications/agents/webhook.ts
  • src/components/Settings/Notifications/NotificationsWebhook/index.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request to add several fields to JSON payload

1 participant