Skip to content

Repository files navigation

Banner

Welcome to the Sharr repository! This is a simple docker service which allows you to import shows and movies from your Plex watchlist. It uses the Plex API to get the watchlist and gives you a list compatible with Radarr and Sonarr.

Project Overview

Sharr converts your watchlist into lists which are compatible with many different services. The main difference from using this other than importing your plex watchlist directly is that you can filter out shows and movies which are already available on your preferred streaming services (Set in Plex). This will greatly reduce the amount of downloads and storage needed.

Getting Started

  1. Add the service to your docker compose file
services:
sharr:
image: thom1606/sharr:latestcontainer_name: sharrports:
- 6464:6464environment:
- PLEX_EXTRA_USER_TOKENS=token2,token3 # Optional
- PLEX_OWNER_TOKEN=token1
- IGNORE_PREFERRED_SERVICES=false # Optional
  1. Start your docker containers
  2. Add the service url to your Radarr or Sonarr settings

Setting up Radarr

  1. Go to Settings > Import Lists > Add List > Custom Lists
  2. Set the list URL to http://localhost:6464/radarr
  3. Test if the list is reachable and save

Setting up Sonarr

  1. Go to Settings > Import Lists > Add List > Custom Lists
  2. Set the list URL to http://localhost:6464/sonarr
  3. Test if the list is reachable and save

Configuration

Environment Variables

VariableDescriptionDefault
PLEX_OWNER_TOKENThe token for the owner of the plex server
PLEX_EXTRA_USER_TOKENSA comma separated list of tokens for extra users
IGNORE_PREFERRED_SERVICESWhether to ignore your preferred servicesfalse
PORTThe port the service listens on6464
CACHE_TTL_SECONDSHow long a fetched watchlist is reused. Set to 0 to disable caching300
PLEX_TIMEOUT_SECONDSTimeout for a single request to the Plex API15

Endpoints

EndpointDescription
/radarrThe movies on your watchlist, as a Radarr custom list
/sonarrThe series on your watchlist, as a Sonarr custom list
/healthReturns 200 when every configured Plex token is still valid, 401 otherwise

The watchlist is cached for CACHE_TTL_SECONDS, so frequent polling no longer means a full walk through the Plex API on every request.

FAQ

Where do i find my Plex token?

The plex token can be found by inspecting the network requests in your browser. You can find a guide here. Every request will have a X-Plex-Token header which you can copy.

Development

Requires Bun.

bun install
bun run dev # start with hot reload on http://localhost:6464
bun test# unit tests; the live Plex tests need PLEX_OWNER_TOKEN
bun run typecheck # tsc --noEmit
bun run lint # biome

About

Welcome to the Sharr repository! This is a simple docker service which allows you to import shows and movies from your Plex watchlist. It uses the Plex API to get the watchlist and gives you a list compatible with radarr and sonarr.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Sponsor this project

Used by

Contributors

Languages