Skip to content

Real-time Plex Watchlist synchronization triggered by Radarr/Sonarr deletions, with TMDB/TVDB/IMDB matching, fuzzy fallback, and cached Plex index.

License

Notifications You must be signed in to change notification settings

MrCee/plexpulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 PlexPulse

Automatically synchronise your Plex Watchlist with Radarr and Sonarr deletions.
Whenever a movie or series is removed in Radarr/Sonarr, PlexPulse instantly removes it from your Plex Watchlist β€” keeping your ecosystem neat, accurate, and clutter-free.

No more re-downloading removed content.
No more stale items in your Watchlist.


✨ Features

πŸ”— Real-time Watchlist Cleanup

Removes titles from your Plex Watchlist when Radarr or Sonarr trigger:

  • MovieDelete
  • SeriesDelete

πŸ” Smart Multi-Stage Matching

PlexPulse identifies the correct item using:

  1. TMDB ID
  2. TVDB ID
  3. IMDB ID
  4. File path fragments
  5. Fuzzy title matching
  6. Watchlist ID + fuzzy fallback

⚑ NEW: Instant Plex Library Indexing Engine

PlexPulse now loads your entire Plex library once at startup, creating a high-precision index of:

  • TMDB β†’ ratingKey
  • IMDB β†’ ratingKey
  • TVDB β†’ ratingKey
  • File path fragments
  • Cleaned titles

This massively reduces Plex API calls and speeds up matching.

β™» Automatic Index Refresh

A background thread refreshes the index every INDEX_REFRESH_HOURS (default 72).
You can also refresh manually:

GET /refresh

πŸ“Š NEW: Statistics Endpoint

Check index size, memory footprint, and last refresh time:

GET /stats

πŸ›‘ Safe by Design

PlexPulse only removes titles from your Plex Watchlist when:

  1. A full deletion event occurs in Radarr/Sonarr
  2. A matching Plex item is positively identified

It never touches your Plex library or files.

🐳 Docker-Ready

Built specifically for Synology, Unraid, Linux, macOS.


πŸš€ Quick Start

1️⃣ Clone the project

git clone https://github.com/MrCee/plexpulse.git
cd plexpulse

2️⃣ Create your .env

cp .env.example .env
nvim .env

Fill in:

  • PLEX_BASEURL
  • PLEX_TOKEN
  • Library names
  • Logging level (optional)
  • INDEX_REFRESH_HOURS (optional)

3️⃣ Start the container

docker compose up -d --build

Health check:

http://<ip>:8080/health

πŸ”§ Webhook Setup

Radarr

Enable only:

βœ” On Movie Delete

URL:

http://plexpulse:8080/radarr

Sonarr

Enable only:

βœ” On Series Delete

URL:

http://plexpulse:8080/sonarr

πŸ—‘ Automatic Watchlist Sync

PlexPulse removes titles from your Plex Watchlist only when:

βœ” Radarr permanently deletes a movie

(Event: MovieDelete)

βœ” Sonarr permanently deletes a full series

(Event: SeriesDelete)

Nothing else triggers cleanup β€” only full, intentional deletions.

PlexPulse syncs what you delete, keeping Plex aligned with your download manager.


πŸ”₯ NEW: Plex Library Indexing Engine

At startup, PlexPulse scans your Plex libraries once, indexing:

  • TMDB IDs
  • IMDB IDs
  • TVDB IDs
  • File fragments from media items
  • Cleaned titles

This index enables:

  • Instant TMDB/IMDB/TVDB lookups
  • Super-fast fuzzy matching
  • Efficient path lookups
  • Minimal Plex API calls

Index stats:

GET /stats

Example:

{
  "built_at": "2025-11-18T00:52:57Z",
  "tmdb": 783,
  "imdb": 773,
  "tvdb": 771,
  "path_fragments": 464,
  "titles": 785,
  "memory_mb": 22.4
}

Auto-refresh

Runs every INDEX_REFRESH_HOURS (default: 72 hours).

Manual refresh:

GET /refresh

⚠ What PlexPulse Does NOT Do

PlexPulse does not:

  • Delete files
  • Modify Plex library content
  • Remove items directly from your library
  • Trigger scans unless you explicitly enable it
  • Change Radarr/Sonarr behaviour

It only removes items from Plex Watchlist, not your library.


πŸ•’ Why Plex Library Items Don’t Disappear Immediately

When Radarr/Sonarr delete a file:

πŸ“Œ Plex still shows it as β€œplayable” until Plex itself detects the deletion.

Plex updates only when:

  • Scheduled library scans run
  • You manually press β€œScan Library Files”
  • Plex auto-detects changes on disk
  • A metadata refresh occurs

➑ PlexPulse does not remove items from your Plex library.
➑ PlexPulse cannot control or speed up Plex’s library scan schedule.

(Optional feature available on request:
β€œAdd Plex scan trigger support.”)


πŸ§ͺ Testing

Radarr test

curl -X POST http://localhost:8080/radarr \
  -H "Content-Type: application/json" \
  -d '{
        "eventType": "MovieDelete",
        "movie": { "title": "Test", "tmdbId": 12345 }
      }'

Sonarr test

curl -X POST http://localhost:8080/sonarr \
  -H "Content-Type: application/json" \
  -d '{
        "eventType": "SeriesDelete",
        "series": { "title": "Test Show", "tvdbId": 54321 }
      }'

πŸ›‘ Safety Guarantees

PlexPulse never removes anything unless:

  1. Event type is a full deletion
  2. Matching succeeds
  3. Watchlist removal is confirmed

It does not touch files, your Plex library, or metadata.


🀝 Contributing

  • PRs welcome
  • Matching logic expansions
  • Indexing improvements
  • Docker optimisations

πŸ“œ License

MIT License β€” see the LICENSE file.


⭐ Enjoy a Clean Watchlist!

PlexPulse keeps your Plex Watchlist aligned with your real media library β€” exactly the automation Plex should have built in.

If you find PlexPulse useful, please consider ⭐ starring the repository!

About

Real-time Plex Watchlist synchronization triggered by Radarr/Sonarr deletions, with TMDB/TVDB/IMDB matching, fuzzy fallback, and cached Plex index.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published