Skip to content

Commit

Permalink
Plex token readme update (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
nylonee authored Nov 22, 2023
1 parent ec5ed68 commit 92767e3
Showing 1 changed file with 58 additions and 55 deletions.
113 changes: 58 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,82 +4,99 @@

Sync plex watchlists in realtime with Sonarr and Radarr.

### Requirements
* Plex Pass Subscription for main user
* Sonarr v4 or higher
* Radarr v3 or higher
* Friends must change privacy settings so that the main user can see their watchlists
* Docker or Java
## How it works

There are several ways of fetching watchlist information from Plex

| Method | Pros | Cons | Supported by Watchlistarr | Supported by Overseer/Ombi | Supported by Sonarr/Radarr |
|-----------------------------------------|-------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|---------------------------|----------------------------|------------------------------|
| Plex Watchlist RSS Feeds | Fast and instantly updated, can create one for self and one for friends | Will only show the most recent 50 movies/shows | Yes | X | Yes, refreshes every 6 hours |
| Plex Watchlist Metadata | Can fetch the full watchlist for the user | Need a plex token for each user who wants to have their watchlist synced, Plex token expires after a few months | Yes, on first startup | Yes, not real-time | X |
| Plex Watchlist GraphQL Call | Can fetch the full watchlist for every friend of the main user | Slow, relies on main user providing a plex token | Yes, on first startup | X | X |
| Plex Watchlist Metadata for other users | Can fetch the full watchlist for every user who provides a token | Difficult to ask every user to generate a Plex token, or log into a service | Coming Soon | Yes, not real-time | X |

## Why?
In order to fully integrate with Plex Watchlists, Watchlistarr uses a combination of multiple methods to ensure that it
does a comprehensive, yet fast real-time sync.

### Sonarr/Radarr limitation
### Full Delete Sync

While Sonarr and Radarr have built-in functionality (in v4 and v3 respectively), they are set at 6 hour refresh
intervals, and cannot be customized
Watchlistarr is working towards being able to support a full delete sync with your watchlist. This means that **if
a user
removes an item off their watchlist, Watchlistarr can detect that and delete content from Sonarr/Radarr.**

### Ombi/Overseer limitation
This feature is still in beta, and will be released soon.

While Ombi and Overseer have built-in functionality, there are a few problems with this:
### Requirements

* They are customizable down to 5 minute intervals, so doesn't allow the "real-time" sync that Watchlistarr does
* They rely on Plex tokens, which expire and break the sync if you're not regularly logging into Ombi/Overseer
* They can only sync the current user's watchlist. If you have friends you've added to your Plex server, you won't be
able to sync their watchlist
* Plex Pass Subscription
* Sonarr v4 or higher
* Radarr v3 or higher
* Friends must change their privacy settings so that the main user can see their watchlists
* Docker or Java

## Getting Started

### Docker

The easiest way to try this code is using docker:

```bash
docker run \
-e SONARR_API_KEY=YOUR_API_KEY \
-e RADARR_API_KEY=YOUR_API_KEY \
-e PLEX_WATCHLIST_URL_1=YOUR_PLEX_WATCHLIST_URL \
-e REFRESH_INTERVAL_SECONDS=5 \
nylonee/watchlistarr
```

If you also have a Plex token in hand, you can add it to the command above to enhance your experience:

```bash
-e PLEX_TOKEN=YOUR_PLEX_TOKEN \
```

For a full list of possible environment variables to configure the app with, see the Environment Variables section of
this Readme

Docker tag options:

* `latest` - Stable version, follows the Releases
* `beta` - Beta version, follows the main branch
* `alpha` - Experimental version, follows the latest successful PR build

### Environment Variables (For Docker only)

| Key | Example Value | Optional | Description |
|--------------------------|----------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| REFRESH_INTERVAL_SECONDS | 60 | Yes | Number of seconds to wait in between checking the watchlist |
| SONARR_API_KEY | 7a392fb4817a46e59f2e84e7d5f021bc | No | API key for Sonarr, found in your Sonarr UI -> General settings |
| SONARR_BASE_URL | http://localhost:8989 | Yes | Base URL for Sonarr, including the 'http' and port and any configured urlbase |
| SONARR_QUALITY_PROFILE | 1080p | Yes | Quality profile for Sonarr, found in your Sonarr UI -> Profiles settings |
| SONARR_ROOT_FOLDER | /data/ | Yes | Root folder for Sonarr |
| SONARR_BYPASS_IGNORED | true | Yes | Boolean flag to bypass tv shows that are on the Sonarr Exclusion List |
| SONARR_SEASON_MONITORING | all | Yes | Default monitoring for new seasons added to Sonarr. Full list of options are found in the [Sonarr API Docs](https://sonarr.tv/docs/api/#/Series/post_api_v3_series) under **MonitorTypes** |
| RADARR_API_KEY | 7a392fb4817a46e59f2e84e7d5f021bc | No | API key for Radarr, found in your Radarr UI -> General settings |
| RADARR_BASE_URL | http://127.0.0.1:7878 | Yes | Base URL for Radarr, including the 'http' and port and any configured urlbase |
| RADARR_QUALITY_PROFILE | 1080p | Yes | Quality profile for Radarr, found in your Radarr UI -> Profiles settings |
| RADARR_ROOT_FOLDER | /data/ | Yes | Root folder for Radarr |
| RADARR_BYPASS_IGNORED | true | Yes | Boolean flag to bypass movies that are on the Radarr Exclusion List |
| PLEX_WATCHLIST_URL_1 | https://rss.plex.tv/UUID | No | First Plex Watchlist URL |
| PLEX_WATCHLIST_URL_2 | https://rss.plex.tv/UUID | Yes | Second Plex Watchlist URL (if applicable) |


### Java

Running this using native java requires the fat jar, download the latest from the Releases tab, and run:

```bash
java -jar watchlistarr.java\
-Dsonarr.apikey=YOUR_API_KEY\
-Dradarr.apikey=YOUR_API_KEY\
-Dplex.watchlist1=YOUR_PLEX_WATCHLIST_URL
```
For a full list of options to pass in and how they relate to the environment variable, see [entrypoint.sh](https://github.com/nylonee/watchlistarr/blob/main/docker/entrypoint.sh)

### Getting your Plex Watchlist URLs

1. Go to [Watchlist settings in Plex](https://app.plex.tv/desktop/#!/settings/watchlist)
2. Generate RSS Feeds for the watchlists you want to monitor, and copy those URLs
For a full list of options to pass in,
see [entrypoint.sh](https://github.com/nylonee/watchlistarr/blob/main/docker/entrypoint.sh)

### Environment Variables

| Key | Default | Description |
|--------------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| SONARR_API_KEY* | | API key for Sonarr, found in your Sonarr UI -> General settings |
| RADARR_API_KEY* | | API key for Radarr, found in your Radarr UI -> General settings |
| PLEX_WATCHLIST_URL_1* | | First Plex Watchlist URL, generated via [this link](https://app.plex.tv/desktop/#!/settings/watchlist) |
| PLEX_WATCHLIST_URL_2 | | Second Plex Watchlist URL (if applicable) |
| PLEX_TOKEN | | Token for Plex, retrieved via [this tutorial](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/) |
| REFRESH_INTERVAL_SECONDS | 60 | Number of seconds to wait in between checking the watchlist |
| SONARR_BASE_URL | http://localhost:8989 | Base URL for Sonarr, including the 'http' and port and any configured urlbase |
| SONARR_QUALITY_PROFILE | | Quality profile for Sonarr, found in your Sonarr UI -> Profiles settings. If not set, will grab the first one it finds on Sonarr |
| SONARR_ROOT_FOLDER | | Root folder for Sonarr. If not set, will grab the first one it finds on Sonarr |
| SONARR_BYPASS_IGNORED | false | Boolean flag to bypass tv shows that are on the Sonarr Exclusion List |
| SONARR_SEASON_MONITORING | all | Default monitoring for new seasons added to Sonarr. Full list of options are found in the [Sonarr API Docs](https://sonarr.tv/docs/api/#/Series/post_api_v3_series) under **MonitorTypes** |
| RADARR_BASE_URL | http://127.0.0.1:7878 | Base URL for Radarr, including the 'http' and port and any configured urlbase |
| RADARR_QUALITY_PROFILE | | Quality profile for Radarr, found in your Radarr UI -> Profiles settings. If not set, will grab the first one it finds on Radarr |
| RADARR_ROOT_FOLDER | | Root folder for Radarr. If not set, will grab the first one it finds on Radarr |
| RADARR_BYPASS_IGNORED | false | Boolean flag to bypass movies that are on the Radarr Exclusion List |

## Developers Corner

Expand All @@ -94,17 +111,3 @@ Run the docker image:
```
docker run nylonee/watchlistarr
```

Run the sbt version:

```
sbt run
```

Make a fat jar:

```
sbt assembly
```

(look in target/scala-2.13/watchlistarr-assembly-VERSION.jar)

0 comments on commit 92767e3

Please sign in to comment.