diff --git a/README.md b/README.md index 20f6352..8c9fc57 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,20 @@ Sync plex watchlists in realtime with Sonarr and Radarr. **Requires Plex Pass** **Requires Sonarr v4** ## Why? + ### Sonarr/Radarr limitation -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 + +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 ### Ombi/Overseer limitation + While Ombi and Overseer have built-in functionality, there are two problems with this: - * 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 + +* 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 ## Getting Started @@ -29,25 +35,26 @@ docker run \ ``` 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 - -| 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 | -| 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 | -| 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 | -| 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) | + +* `latest` - Stable version, follows the Releases +* `beta` - Beta version, follows the main branch +* `alpha` - Experimental version, follows the latest successful PR build + +| 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 | +| 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) | ### Getting your Plex Watchlist URLs diff --git a/src/main/scala/utils/ArrUtils.scala b/src/main/scala/utils/ArrUtils.scala index d43540f..b7ad1ed 100644 --- a/src/main/scala/utils/ArrUtils.scala +++ b/src/main/scala/utils/ArrUtils.scala @@ -6,14 +6,10 @@ import org.http4s.{Method, Uri} object ArrUtils { - def getToArr(client: HttpClient)(baseUrl: Uri, apiKey: String, endpoint: String): IO[Either[Throwable, Json]] = { - val path = Uri.Path.unsafeFromString(s"/api/v3/$endpoint") - client.httpRequest(Method.GET, baseUrl.withPath(path), Some(apiKey)) - } + def getToArr(client: HttpClient)(baseUrl: Uri, apiKey: String, endpoint: String): IO[Either[Throwable, Json]] = + client.httpRequest(Method.GET, baseUrl / "api" / "v3" / endpoint, Some(apiKey)) - def postToArr(client: HttpClient)(baseUrl: Uri, apiKey: String, endpoint: String)(payload: Json): IO[Either[Throwable, Json]] = { - val path = Uri.Path.unsafeFromString(s"/api/v3/$endpoint") - client.httpRequest(Method.POST, baseUrl.withPath(path), Some(apiKey), Some(payload)) - } + def postToArr(client: HttpClient)(baseUrl: Uri, apiKey: String, endpoint: String)(payload: Json): IO[Either[Throwable, Json]] = + client.httpRequest(Method.POST, baseUrl / "api" / "v3" / endpoint, Some(apiKey), Some(payload)) }