Skip to content

Latest commit

 

History

History
165 lines (117 loc) · 6.53 KB

README.md

File metadata and controls

165 lines (117 loc) · 6.53 KB

Infinite Plex Library (BETA!)

Demo video: https://imgur.com/a/xADw6ut image

Overview

This project allows you to create an infinite Plex library without pre-downloading movies from your Debrid provider. The script sets up a "dummy" MP4 file of 1 second for each movie requested in Radarr with the "dummy" tag. When you play a movie in Plex, Tautulli sends a webhook notification to the script, which then triggers the actual movie request in Radarr.

Using this approach, you can leverage Radarr to populate your Plex with lists of movies marked with a "dummy" tag without actively monitoring them. When a movie is played, the script modifies its status and begins the download process.

This script can also be used in combination with Kometa. Use Kometa to create collections like 'Today Popular on x' or 'Most Downloaded Movies This Week' Kometa can add these movies to Radarr with the dummy tag, allowing you to display them in Plex without actually requesting them upfront. You can showcase these collections on your Plex Home for all users, providing them with a 'Netflix-like' experience.

With this script, you can manage a large Plex library without overloading your Debrid Providers or Indexers. Movies are typically available within two minutes if they are cached by the provider!

Note: This script is currently in BETA.

Features

  • Infinite Plex Library: Seamlessly maintain a large Plex library without needing to add all the movies to your Debrid provider in advance.
  • Dynamic Movie Retrieval: Automatically request movies through Radarr upon playback in Plex.
  • Tautulli Integration: Tautulli webhooks trigger movie downloads, minimizing resource usage until a movie is actually played.
  • Kometa Compatibility: Use this script alongside Kometa to create popular movie categories that are added in an unmonitored state.
  • Efficient Debrid Utilization: Avoid overloading Debrid Providers and Indexers, ensuring availability only when needed.

How It Works

  1. Dummy File Setup: When a movie is added to Radarr (via Kometa, Radarr lists or manually), with tag "dummy" and not monitored, the script places a 1-second dummy MP4 file in the Plex directory for that movie.
  2. Playback Detection: When you play a movie in Plex, Tautulli sends a webhook notification to the script.
  3. Movie Request: The script checks the library and, if the movie is only a dummy, it requests the full movie via Radarr.
  4. Fast Availability: If the movie is cached by the Debrid provider, it becomes available in Plex within approximately one or two minutes.

Installation & Usage

Ensure that your Tautulli is set up to send playback start events to the webhook URL configured for this script.

Infinite Plex Library

Place the dummy.mp4 file in /infiniteplexlibrary/dummy.mp4

For manual maintenance, run npx ts-node /scripts/maintenance.ts inside the Docker console. This will verify if every Radarr movie with the "dummy" tag still has a dummy.mp4 file. It will also check if downloaded movies contain a dummy.mp4 file, and the script will delete it if found. After running this, you will need to manually refresh the Plex library.

Tautulli

Create a new Notification Agent in the Tautulli settings.

Movies:

Webhook URL: http://ip:port/webhook

Webhook method: POST

Trigger: Playback Start

Condition: Filename is dummy.mp4

JSON Data for playback start:

{
    "event": "playback.start",
    "file": "{file}",
    "imdb_id": "{imdb_id}",
    "tmdb_id": "{themoviedb_id}",
    "user": "{user}",
    "title": "{title}",
    "rating_key": "{rating_key}",
    "media_type": "{media_type}",
    "player": "{player}"
}

Series:

Webhook URL: http://ip:port/webhook

Webhook method: POST

Trigger: Playback Start

Condition: Filename ends with (dummy).mp4

JSON Data for playback start:

{
    "event": "playback.start",
    "file": "{file}",
    "imdb_id": "{imdb_id}",
    "tmdb_id": "{themoviedb_id}",
    "user": "{user}",
    "title": "{title}",
    "rating_key": "{rating_key}",
    "media_type": "{media_type}",
    "player": "{player}",
    "season_num": "{season_num}",
    "thetvdb_id": "{thetvdb_id}"
}

Radarr

Radarr list example: image

Create this Connect webhook in Radarr to communicate with the script if a new movie with the tag 'dummy' is added: image

Note: Don't map MOVIE_FOLDER_DUMMY to Radarr in Docker. This is necassery so Radarr doesn't mark the movie as downloaded!!

Sonarrr

Create this Connect webhook in Sonarr to communicate with the script if a new series with the tag 'dummy' is added: image

Kometa

config.yml

radarr:
  url: http://192.168.1.237:7878
  token: xxxxxx
  add_missing: true
  add_existing: false
  upgrade_existing: false
  monitor_existing: false
  root_folder_path: /plex/Movies
  monitor: false
  availability: announced
  quality_profile: Radarr
  tag: dummy
  search: false
  plex_path: /media/Movies

Prerequisites

  • Plex Media Server
  • Tautulli for playback detection
  • Radarr for managing and requesting movies

Example Use Cases

  • Manage Large Libraries: Add thousands of movies to Plex without overwhelming your Debrid provider by using dummy placeholders.
  • Kometa Integration: Combine with Kometa collections to add trending movies automatically to Radarr with tag "dummy".
  • Efficient Storage Use: Keep a vast Plex library without using extensive storage or network resources until the content is actually played.

Known Limitations

  • BETA Version: The script is still in beta, so there are cases that aren't fully handled.

To-do

  • Sonarr support
  • Better code
  • A scheduler that checks if there are movies that should have a dummy file but do not have one yet.
  • Make a better Docker image
  • Some ideas from the community

Contributing

Contributions are welcome! Please submit a pull request or raise an issue to discuss improvements or report bugs.

Disclaimer

Use this script at your own risk. This is a beta version and may contain bugs or limitations that could affect library management or playback experience.


If you have any questions or need further assistance, feel free to reach out or create an issue on the GitHub repository. Discord: spinix3845