selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
prefetcharr logo

Self-host prefetcharr

0.10.0

Prefetch Sonarr episodes during Jellyfin/Emby/Plex playback

BetaOpen SourceOther
Updated2 days ago
LanguageRust
Setup difficultyModerate
Stars
282
Docker
phueber/prefetcharr
Install with Docker Compose

What is prefetcharr?

prefetcharr is a self-hosted background service that connects to your media server (Jellyfin, Emby, Plex, or Tautulli) and Sonarr. It periodically polls for active TV show playback sessions, checks if a configured number of upcoming episodes are available, and triggers Sonarr to search for any missing episodes. It can request individual episodes or full season packs, optionally tag series in Sonarr when episodes are prefetched, and exclude series by tag. The project is written in Rust and distributed as a Docker image or via cargo install. Configuration is done through a TOML file or the PREFETCHARR_CONFIG environment variable, covering polling interval, log settings, prefetch count, season pack preference, and API credentials for both the media server and Sonarr.

prefetcharr alternatives

Should you self-host prefetcharr?

prefetcharr scores 46/100 on selfhost.directory (how scoring works) and ranks #92 of 142 in Media Management. It has 282 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Other-licensed and written mostly in Rust.

Its closest alternative on selfhost.directory is Sonarr (81/100, 17 486 stars). It scores higher overall, so compare the two before you pick. See prefetcharr vs Sonarr side by side.

Features

  • Automatic episode prefetching
  • Configurable prefetch count
  • Multiple media server support
  • Season pack preference
  • Sonarr tag integration
  • TOML Configuration
  • User and library filtering

prefetcharr README

prefetcharr

Have Sonarr automatically fetch the next episodes of the show you’re watching on Jellyfin/Emby/Plex.

Details

prefetcharr periodically polls your media server for active playback sessions of TV shows. It then checks whether a configured number of successive episodes is available. If there are episodes missing, it asks Sonarr to search for them. Depending on the configuration, it searches the missing episodes individually or tries to fetch all seasons that contain them. If there are no more seasons left, the series is monitored for new seasons instead.

How to install prefetcharr

Install prefetcharr with Docker Compose

Environment variables
PREFETCHARR_CONFIG

services: prefetcharr: image: phueber/prefetcharr:latest container_name: prefetcharr user: 1000:1000 environment: - | PREFETCHARR_CONFIG= # Start of the configuration in TOML format.

    interval = 900           # Polling interval in seconds
    log_dir = "/log"         # Logging directory
    log_level = "Debug"      # `Trace`, `Debug`, `Info`, `Warn` or `Error`
    prefetch_num = 2         # Number of episodes to make available in advance, given as an
                             # absolute number or a percentage of the season (e.g. "50%")
    request_seasons = true   # Always request full seasons to prefer season packs
    append_to_queue = false  # Experimental: Append upcoming episodes to the player's active queue.
                             # Not supported by all clients. Not compatible with Tautulli.
    connection_retries = 6   # Number of retries for the initial connection probing

    [media_server]
    type = "Jellyfin"                       # `Jellyfin`, `Emby`, `Plex` or `Tautulli`
    url = "http://example.com/jellyfin"     # Jellyfin/Emby/Plex/Tautulli baseurl
    api_key = "<YOUR KEY HERE>"             # Jellyfin/Emby/Tautulli API key or plex server token
    # users = [ "John", "12345", "Axel F" ] # Optional: Only monitor sessions for specific user IDs or names
    # libraries = [ "TV Shows", "Anime" ]   # Optional: Only monitor sessions for specific libraries

    [sonarr]
    url = "http://example.com/sonarr" # Sonarr baseurl
    api_key = "<YOUR KEY HERE>"       # Sonarr API key
    # exclude_tag = "no_prefetch"     # Optional: Exclude series by tag
    # apply_tag = "prefetched"        # Optional: Tag series when episodes are prefetched for them

volumes:
  - /path/to/log/dir:/log
  # Keep the config in a file instead of PREFETCHARR_CONFIG
  # - /path/to/config.toml:/config

Configuration provided via PREFETCHARR_CONFIG environment variable or mounted config file

prefetcharr releases & version history

More in Automation

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…