### Sonarr Base URL Configuration Example (config.yaml) Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Example of how to configure the Sonarr base URL in the config.yaml file, including the default value. ```yaml # baseUrl: "127.0.0.1:8989" # Base URL for Sonarr, including the 'http' and port and any configured urlbase. DEFAULT: "127.0.0.1:8989" ``` -------------------------------- ### Start Watchlistarr on Windows Startup Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md This batch script can be used to start Watchlistarr automatically on Windows startup. It includes placeholders for API keys and tokens, and sets the JVM heap size. ```batch @ECHO OFF java -Dsonarr.apikey=YOUR_API_KEY -Dradarr.apikey=YOUR_API_KEY -Dplex.token=YOUR_PLEX_TOKEN -Xmx100m -jar watchlistarr.jar ``` -------------------------------- ### Build Docker Image Source: https://github.com/nylonee/watchlistarr/blob/main/README.md Builds the Docker image for Watchlistarr. Ensure Docker is installed and running. ```bash docker build -t nylonee/watchlistarr:latest -f docker/Dockerfile . ``` -------------------------------- ### Run Watchlistarr with Docker Volume Configuration Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md This example demonstrates running Watchlistarr with Docker, including mounting a configuration volume and setting essential environment variables. Watchlistarr will automatically create a `config.yaml` template if it doesn't exist. ```bash docker run \ -e SONARR_API_KEY=YOUR_API_KEY \ -e RADARR_API_KEY=YOUR_API_KEY \ -e PLEX_TOKEN=YOUR_PLEX_TOKEN \ -v config:/app/config \ nylonee/watchlistarr ``` -------------------------------- ### Get Plex Self Watchlist Source: https://context7.com/nylonee/watchlistarr/llms.txt Fetch your own Plex watchlist using a token. Supports pagination for large watchlists. ```bash curl -X GET "https://discover.provider.plex.tv/library/sections/watchlist/all?X-Plex-Token=your_token&X-Plex-Container-Start=0&X-Plex-Container-Size=300" ``` -------------------------------- ### Compile Watchlistarr with SBT Source: https://context7.com/nylonee/watchlistarr/llms.txt Compile the Watchlistarr project using SBT (Scala Build Tool). Ensure JDK 11+ and SBT are installed. ```bash sbt compile ``` -------------------------------- ### Get Exclusions from Radarr Source: https://context7.com/nylonee/watchlistarr/llms.txt Fetch the list of exclusions configured in Radarr. ```bash curl -X GET "http://localhost:7878/api/v3/exclusions" \ -H "X-Api-Key: your_radarr_api_key" ``` -------------------------------- ### Run Watchlistarr with Docker and Debug Mode Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md This example shows how to run the Watchlistarr Docker container with both essential environment variables and debug mode enabled, using multiline formatting for clarity. ```bash docker run \ -e SONARR_API_KEY=YOUR_API_KEY \ -e RADARR_API_KEY=YOUR_API_KEY \ -e PLEX_TOKEN=YOUR_PLEX_TOKEN \ -e LOG_LEVEL=DEBUG \ nylonee/watchlistarr ``` -------------------------------- ### Windows Startup Script for Watchlistarr Source: https://context7.com/nylonee/watchlistarr/llms.txt A batch script to automatically start Watchlistarr on Windows. Place the script in the same directory as watchlistarr.jar and create a shortcut in the Windows startup folder. It supports basic properties or a config file. ```batch @ECHO OFF REM watchlistarr-start.bat REM Place in same directory as watchlistarr.jar REM Create shortcut in shell:startup and set to run minimized java -Dsonarr.apikey=your_sonarr_api_key ^ -Dradarr.apikey=your_radarr_api_key ^ -Dplex.token=your_plex_token ^ -Dsonarr.baseUrl=http://localhost:8989 ^ -Dradarr.baseUrl=http://localhost:7878 ^ -Dinterval.seconds=30 ^ -Xmx100m ^ -jar watchlistarr.jar REM Alternative with config file only: REM java -DconfigPath=config.yaml -Xmx100m -jar watchlistarr.jar ``` -------------------------------- ### Plex API - Get Self Watchlist Source: https://context7.com/nylonee/watchlistarr/llms.txt Fetches the user's own watchlist from Plex, with pagination support. ```APIDOC ## GET /library/sections/watchlist/all ### Description Fetches the user's own watchlist from Plex. ### Method GET ### Endpoint https://discover.provider.plex.tv/library/sections/watchlist/all ### Parameters #### Query Parameters - **X-Plex-Token** (string) - Required - Your Plex authentication token. - **X-Plex-Container-Start** (integer) - Optional - The starting index for pagination. Defaults to 0. - **X-Plex-Container-Size** (integer) - Optional - The number of items to retrieve per page. Defaults to 300. ### Response #### Success Response (200) - **watchlist** (object) - Contains watchlist items. #### Response Example (Structure not provided in source) ``` -------------------------------- ### Get All Movies from Radarr Source: https://context7.com/nylonee/watchlistarr/llms.txt Retrieve a list of all movies currently in your Radarr library. ```bash curl -X GET "http://localhost:7878/api/v3/movie" \ -H "X-Api-Key: your_radarr_api_key" ``` -------------------------------- ### Sonarr API v3 - Get All Series Source: https://context7.com/nylonee/watchlistarr/llms.txt Retrieve a list of all series currently managed by Sonarr using a `curl` GET request to the API v3 series endpoint. Requires your Sonarr API key for authentication. ```bash # Sonarr API v3 - Get All Series curl -X GET "http://localhost:8989/api/v3/series" \ -H "X-Api-Key: your_sonarr_api_key" ``` -------------------------------- ### Sonarr API v3 - Get Import List Exclusions Source: https://context7.com/nylonee/watchlistarr/llms.txt Fetch the list of import list exclusions from Sonarr using a `curl` GET request to the API v3 importlistexclusion endpoint. This requires your Sonarr API key for access. ```bash # Sonarr API v3 - Get Import List Exclusions curl -X GET "http://localhost:8989/api/v3/importlistexclusion" \ -H "X-Api-Key: your_sonarr_api_key" ``` -------------------------------- ### Plex API - Get Friend Watchlist via GraphQL Source: https://context7.com/nylonee/watchlistarr/llms.txt Fetches a specific friend's watchlist using GraphQL, with pagination. ```APIDOC ## POST /api ### Description Fetches a specific friend's watchlist using GraphQL, with pagination. ### Method POST ### Endpoint https://community.plex.tv/api ### Parameters #### Headers - **X-Plex-Token** (string) - Required - Your Plex authentication token. - **Content-Type** (string) - Required - application/json #### Request Body - **query** (string) - Required - The GraphQL query string to fetch a friend's watchlist. - `query GetWatchlistHub($uuid: ID = "", $first: PaginationInt!, $after: String) { user(id: $uuid) { watchlist(first: $first, after: $after) { nodes { id title type } pageInfo { hasNextPage endCursor } } } }` - **variables** (object) - Required - Variables for the GraphQL query. - **first** (integer) - Required - The number of items to retrieve per page. - **uuid** (string) - Required - The user ID of the friend. ### Response #### Success Response (200) - **data** (object) - The response data from the GraphQL query. - **user** (object) - **watchlist** (object) - **nodes** (array of objects) - **id** (string) - **title** (string) - **type** (string) - **pageInfo** (object) - **hasNextPage** (boolean) - **endCursor** (string) #### Response Example ```json { "query": "query GetWatchlistHub($uuid: ID = \"\", $first: PaginationInt!, $after: String) { user(id: $uuid) { watchlist(first: $first, after: $after) { nodes { id title type } pageInfo { hasNextPage endCursor } } } }", "variables": { "first": 100, "uuid": "friend_user_id" } } ``` ``` -------------------------------- ### Get Plex Friends via GraphQL Source: https://context7.com/nylonee/watchlistarr/llms.txt Retrieve a list of your Plex friends using a GraphQL query. Requires a Plex token. ```bash curl -X POST "https://community.plex.tv/api" \ -H "X-Plex-Token: your_token" \ -H "Content-Type: application/json" \ -d '{ "query": "query GetAllFriends { allFriendsV2 { user { id username } } }" }' ``` -------------------------------- ### Radarr API v3 - Get All Movies Source: https://context7.com/nylonee/watchlistarr/llms.txt Retrieves a list of all movies currently managed by Radarr. ```APIDOC ## GET /api/v3/movie ### Description Retrieves a list of all movies managed by Radarr. ### Method GET ### Endpoint http://localhost:7878/api/v3/movie ### Parameters #### Headers - **X-Api-Key** (string) - Required - Your Radarr API key. ### Response #### Success Response (200) - **movies** (array) - A list of movie objects. #### Response Example (Structure not provided in source) ``` -------------------------------- ### Get Friend Watchlist via GraphQL Source: https://context7.com/nylonee/watchlistarr/llms.txt Fetch a specific friend's watchlist using GraphQL. Supports pagination and requires the friend's user ID. ```bash curl -X POST "https://community.plex.tv/api" \ -H "X-Plex-Token: your_token" \ -H "Content-Type: application/json" \ -d '{ "query": "query GetWatchlistHub($uuid: ID = \"\", $first: PaginationInt!, $after: String) { user(id: $uuid) { watchlist(first: $first, after: $after) { nodes { id title type } pageInfo { hasNextPage endCursor } } } }", "variables": { "first": 100, "uuid": "friend_user_id" } }' ``` -------------------------------- ### Radarr API v3 - Get Exclusions Source: https://context7.com/nylonee/watchlistarr/llms.txt Retrieves the list of exclusions from Radarr. ```APIDOC ## GET /api/v3/exclusions ### Description Retrieves the list of exclusions from Radarr. ### Method GET ### Endpoint http://localhost:7878/api/v3/exclusions ### Parameters #### Headers - **X-Api-Key** (string) - Required - Your Radarr API key. ### Response #### Success Response (200) - **exclusions** (array) - A list of exclusion objects. #### Response Example (Structure not provided in source) ``` -------------------------------- ### Plex API - Get Friends via GraphQL Source: https://context7.com/nylonee/watchlistarr/llms.txt Retrieves a list of friends associated with the Plex account using GraphQL. ```APIDOC ## POST /api ### Description Retrieves a list of friends associated with the Plex account using GraphQL. ### Method POST ### Endpoint https://community.plex.tv/api ### Parameters #### Headers - **X-Plex-Token** (string) - Required - Your Plex authentication token. - **Content-Type** (string) - Required - application/json #### Request Body - **query** (string) - Required - The GraphQL query string to fetch friends. - `query GetAllFriends { allFriendsV2 { user { id username } } }` ### Response #### Success Response (200) - **data** (object) - The response data from the GraphQL query. - **allFriendsV2** (object) - **user** (array of objects) - **id** (string) - **username** (string) #### Response Example ```json { "query": "query GetAllFriends { allFriendsV2 { user { id username } } }" } ``` ``` -------------------------------- ### Basic Docker Run Source: https://context7.com/nylonee/watchlistarr/llms.txt Run Watchlistarr with essential environment variables for Sonarr, Radarr, and Plex API keys. ```bash docker run \ -e SONARR_API_KEY=your_sonarr_api_key \ -e RADARR_API_KEY=your_radarr_api_key \ -e PLEX_TOKEN=your_plex_token \ nylonee/watchlistarr ``` -------------------------------- ### Building Watchlistarr from Source Source: https://context7.com/nylonee/watchlistarr/llms.txt Instructions for building Watchlistarr from source using SBT, including compilation, testing, and packaging. ```APIDOC ## Building from Source ### Prerequisites - JDK 11+ - SBT (Scala Build Tool) ### Steps 1. **Clone the repository**: ```bash git clone https://github.com/nylonee/watchlistarr.git cd watchlistarr ``` 2. **Compile the project**: ```bash sbt compile ``` 3. **Run tests**: ```bash sbt test ``` 4. **Create a runnable stage (for Docker builds)**: ```bash sbt stage ``` 5. **Create a fat JAR for distribution**: ```bash sbt assembly ``` *Output will be in `target/scala-2.13/watchlistarr-assembly-*.jar`* 6. **Build a custom Docker image**: ```bash docker build -t my-watchlistarr:latest -f docker/Dockerfile . ``` 7. **Run the custom Docker image**: ```bash docker run \ -e SONARR_API_KEY=key \ -e RADARR_API_KEY=key \ -e PLEX_TOKEN=token \ my-watchlistarr:latest ``` ``` -------------------------------- ### Create Runnable Stage with SBT Source: https://context7.com/nylonee/watchlistarr/llms.txt Prepare the project for creating runnable artifacts, often used for Docker builds. ```bash sbt stage ``` -------------------------------- ### Create Fat JAR with SBT Source: https://context7.com/nylonee/watchlistarr/llms.txt Assemble all project dependencies into a single executable JAR file for distribution. ```bash sbt assembly ``` -------------------------------- ### Full Docker Run with Custom URLs and Config Source: https://context7.com/nylonee/watchlistarr/llms.txt Configure Watchlistarr with custom base URLs, refresh intervals, log levels, and persistent configuration using Docker. ```bash docker run \ -e SONARR_API_KEY=your_sonarr_api_key \ -e SONARR_BASE_URL=http://192.168.1.100:8989 \ -e RADARR_API_KEY=your_radarr_api_key \ -e RADARR_BASE_URL=http://192.168.1.100:7878 \ -e PLEX_TOKEN=your_plex_token \ -e REFRESH_INTERVAL_SECONDS=30 \ -e LOG_LEVEL=DEBUG \ -v /path/to/config:/app/config \ nylonee/watchlistarr ``` -------------------------------- ### Simplified Docker Run Command Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Use this simplified Docker command when API keys and Plex token are provided in the config.yaml file. ```bash docker run \ -v config:/app/config \ nylonee/watchlistarr ``` -------------------------------- ### Running Watchlistarr with Java (with line breaks) Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Execute the Watchlistarr JAR file using Java, providing API keys and Plex token as system properties. Line breaks are supported by some consoles. ```bash java "-Dsonarr.apikey=YOUR_API_KEY"\ "-Dradarr.apikey=YOUR_API_KEY"\ "-Dplex.token=YOUR_PLEX_TOKEN"\ -Xmx100m\ -jar watchlistarr.jar ``` -------------------------------- ### Run Watchlistarr with Basic Properties Source: https://context7.com/nylonee/watchlistarr/llms.txt Execute Watchlistarr using Java properties for essential API keys. Ensure the JAR file is in the current directory. ```bash java -Dsonarr.apikey=your_sonarr_api_key \ -Dradarr.apikey=your_radarr_api_key \ -Dplex.token=your_plex_token \ -Xmx100m \ -jar watchlistarr.jar ``` -------------------------------- ### Build Custom Docker Image Source: https://context7.com/nylonee/watchlistarr/llms.txt Build a custom Docker image for Watchlistarr using the provided Dockerfile. ```bash docker build -t my-watchlistarr:latest -f docker/Dockerfile . ``` -------------------------------- ### Run Watchlistarr with Docker (Multiline) Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md This command demonstrates running Watchlistarr with Docker using line breaks for improved readability. This format is recommended for complex configurations. ```bash docker run \ -e SONARR_API_KEY=YOUR_API_KEY \ -e RADARR_API_KEY=YOUR_API_KEY \ -e PLEX_TOKEN=YOUR_PLEX_TOKEN \ nylonee/watchlistarr ``` -------------------------------- ### Run Watchlistarr with All Options Source: https://context7.com/nylonee/watchlistarr/llms.txt Execute Watchlistarr with a comprehensive set of Java properties, including base URLs, quality profiles, root folders, and interval settings. This allows for fine-grained control over Sonarr, Radarr, and Plex integration. ```bash java -Dsonarr.apikey=your_sonarr_api_key \ -Dsonarr.baseUrl=http://192.168.1.100:8989 \ -Dsonarr.qualityProfile="HD-1080p" \ -Dsonarr.rootFolder=/tv \ -Dsonarr.bypassIgnored=false \ -Dsonarr.seasonMonitoring=all \ -Dradarr.apikey=your_radarr_api_key \ -Dradarr.baseUrl=http://192.168.1.100:7878 \ -Dradarr.qualityProfile="HD-1080p" \ -Dradarr.rootFolder=/movies \ -Dplex.token=your_plex_token \ -Dplex.skipfriendsync=false \ -Dinterval.seconds=30 \ -Dlog.level=DEBUG \ -Xmx100m \ -jar watchlistarr.jar ``` -------------------------------- ### Running Watchlistarr with Java (single line) Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Alternative command to run the Watchlistarr JAR file using Java without line breaks, useful for consoles that do not support them. ```bash java "-Dsonarr.apikey=YOUR_API_KEY" "-Dradarr.apikey=YOUR_API_KEY" "-Dplex.token=YOUR_PLEX_TOKEN" -Xmx100m -jar watchlistarr.jar ``` -------------------------------- ### Run Watchlistarr Tests with SBT Source: https://context7.com/nylonee/watchlistarr/llms.txt Execute the test suite for Watchlistarr using SBT. ```bash sbt test ``` -------------------------------- ### API Keys and Plex Token in config.yaml Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Set API keys for Sonarr and Radarr, and the Plex token within the config.yaml file for simplified Docker commands. ```yaml sonarr: apikey: "YOUR-API-KEY" radarr: apikey: "YOUR-API-KEY" plex: token: "YOUR-PLEX-TOKEN" ``` -------------------------------- ### Run Custom Docker Image Source: https://context7.com/nylonee/watchlistarr/llms.txt Run a custom Watchlistarr Docker image, configuring necessary environment variables for API keys and tokens. ```bash docker run \ -e SONARR_API_KEY=key \ -e RADARR_API_KEY=key \ -e PLEX_TOKEN=token \ my-watchlistarr:latest ``` -------------------------------- ### Run Docker Image Source: https://github.com/nylonee/watchlistarr/blob/main/README.md Runs the Watchlistarr Docker image. This command assumes the image has already been built. ```bash docker run nylonee/watchlistarr ``` -------------------------------- ### Configuring Java Application with configPath Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Specify a custom path for the config.yaml file when running the Java application using the -DconfigPath system property. ```bash java "-DconfigPath=config/config.yaml" -Xmx100m -jar watchlistarr.jar ``` -------------------------------- ### Watchlistarr Default Config.yaml Structure Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md This is a sample structure of the `config.yaml` file used by Watchlistarr. Configuration options are commented out by default and can be enabled by uncommenting and modifying their values. ```yaml ################################################################# ## Sonarr Configuration ################################################################# #sonarr: # baseUrl: "127.0.0.1:8989" # Base URL for Sonarr, including the 'http' and port and any configured urlbase. DEFAULT: "127.0.0.1:8989" # apikey: "YOUR-API-KEY" # API key for Sonarr, found in your Sonarr UI -> General settings # qualityProfile: "Your Desired Sonarr Quality Profile" # If not set, will grab the first one it finds on Sonarr # rootFolder: "/root/folder/location" # Root folder for Sonarr. If not set, will grab the first one it finds on Sonarr # bypassIgnored: false # Boolean flag to bypass tv shows that are on the Sonarr Exclusion List. DEFAULT: false # seasonMonitoring: all # Possible values under 'MonitorTypes' in sonarr.tv/docs/api. DEFAULT: all # tags: # - watchlistarr ``` -------------------------------- ### YAML Configuration File Source: https://context7.com/nylonee/watchlistarr/llms.txt Configure Watchlistarr using a YAML file for detailed settings including sync intervals, Sonarr, Radarr, Plex, and delete sync options. This file is generated on first run with a mounted config volume. ```yaml # Sync interval (default: 10 seconds, overridden to 19 minutes without Plex Pass) interval: seconds: 30 # Sonarr configuration for TV show management sonarr: baseUrl: "http://192.168.1.100:8989" apikey: "your_sonarr_api_key" qualityProfile: "HD-1080p" rootFolder: "/tv" bypassIgnored: false # Set true to add shows even if on exclusion list seasonMonitoring: all # Options: all, future, missing, existing, firstSeason, latestSeason, none tags: - watchlistarr - plex-sync # Radarr configuration for movie management radarr: baseUrl: "http://192.168.1.100:7878" apikey: "your_radarr_api_key" qualityProfile: "HD-1080p" rootFolder: "/movies" bypassIgnored: false # Set true to add movies even if on exclusion list tags: - watchlistarr # Plex configuration plex: token: "your_plex_token" skipfriendsync: false # Set true to only sync your own watchlist # Delete sync configuration (WARNING: This deletes files!) delete: movie: false # Delete movies not on any watchlist endedShow: false # Delete ended shows not on any watchlist continuingShow: false # Delete continuing shows not on any watchlist interval.days: 7 # Wait period before deletion deleteFiles: true # Delete actual files, not just database entries ``` -------------------------------- ### Configure Watchlistarr with Docker Volume Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md This command mounts a Docker volume named `config` to the application's configuration directory (`/app/config`). This is the recommended method for persistent configuration. ```bash -v config:/app/config \ ``` -------------------------------- ### Sonarr Configuration in config.yaml Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Configure the Sonarr base URL in the config.yaml file. Ensure to include the protocol and port. ```yaml sonarr: baseUrl: "192.168.1.12:8989" ``` -------------------------------- ### Run Watchlistarr with Docker Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Use this command to run the Watchlistarr Docker container. Replace placeholders with your actual API keys and tokens. Ensure environment variables are added before the image name. ```bash docker run -e SONARR_API_KEY=YOUR_API_KEY -e RADARR_API_KEY=YOUR_API_KEY -e PLEX_TOKEN=YOUR_PLEX_TOKEN nylonee/watchlistarr ``` -------------------------------- ### Docker Compose Deployment Source: https://context7.com/nylonee/watchlistarr/llms.txt Deploy Watchlistarr using Docker Compose, defining all configurations including API keys, base URLs, quality profiles, and sync settings in a YAML file. ```yaml version: '3.8' services: watchlistarr: image: nylonee/watchlistarr container_name: watchlistarr environment: # Required configuration SONARR_API_KEY: your_sonarr_api_key RADARR_API_KEY: your_radarr_api_key PLEX_TOKEN: your_plex_token # Optional: Custom URLs (defaults: localhost:8989 and localhost:7878) SONARR_BASE_URL: http://sonarr:8989 RADARR_BASE_URL: http://radarr:7878 # Optional: Quality profiles and root folders SONARR_QUALITY_PROFILE: "HD-1080p" SONARR_ROOT_FOLDER: /tv RADARR_QUALITY_PROFILE: "HD-1080p" RADARR_ROOT_FOLDER: /movies # Optional: Sync settings REFRESH_INTERVAL_SECONDS: 30 SKIP_FRIEND_SYNC: "false" # Optional: Delete sync (dangerous - deletes files!) ALLOW_MOVIE_DELETING: "false" ALLOW_ENDED_SHOW_DELETING: "false" ALLOW_CONTINUING_SHOW_DELETING: "false" DELETE_INTERVAL_DAYS: 7 # Optional: Tags for added content SONARR_TAGS: watchlistarr RADARR_TAGS: watchlistarr volumes: - ./config:/app/config restart: unless-stopped ``` -------------------------------- ### Manually Set Sonarr Base URL Property Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md When running natively, you must manually provide the SONARR_BASE_URL as a Java property. Ensure the URL includes the protocol and port. ```bash "-Dsonarr.baseUrl=http://192.168.1.12:8989" ``` -------------------------------- ### Docker-compose Configuration for Watchlistarr Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md This `docker-compose.yaml` file defines the Watchlistarr service, including image, environment variables, and volume configuration for persistent storage. It ensures the container restarts automatically unless stopped. ```yaml version: '3.8' services: watchlistarr: image: nylonee/watchlistarr environment: SONARR_API_KEY: YOUR_API_KEY RADARR_API_KEY: YOUR_API_KEY PLEX_TOKEN: YOUR_PLEX_TOKEN volumes: - config:/app/config restart: unless-stopped volumes: config: ``` -------------------------------- ### Clone Watchlistarr Repository Source: https://context7.com/nylonee/watchlistarr/llms.txt Clone the Watchlistarr source code from GitHub to your local machine. ```bash git clone https://github.com/nylonee/watchlistarr.git cd watchlistarr ``` -------------------------------- ### Run Watchlistarr with External Config File Source: https://context7.com/nylonee/watchlistarr/llms.txt Execute Watchlistarr by specifying the path to an external YAML configuration file using the -DconfigPath property. This is useful for managing configurations separately from command-line arguments. ```bash java -DconfigPath=/etc/watchlistarr/config.yaml \ -Xmx100m \ -jar watchlistarr.jar ``` -------------------------------- ### Docker Environment Variable for Sonarr Base URL Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md Configure the Sonarr base URL using the SONARR_BASE_URL environment variable. This translates to a Java property. ```bash -e SONARR_BASE_URL=http://192.168.1.12:8989 ``` -------------------------------- ### Plex RSS Feed for Watchlist Source: https://context7.com/nylonee/watchlistarr/llms.txt Access your Plex watchlist via an RSS feed. Requires Plex Pass and returns the last 50 items. A random UUID is used as a cache buster. ```bash curl -X GET "https://rss.plex.tv/watchlist/your_rss_id?format=json&cache_buster=random_uuid" ``` -------------------------------- ### Add Movie to Radarr Source: https://context7.com/nylonee/watchlistarr/llms.txt Use this endpoint to add a new movie to your Radarr library. Ensure 'searchForMovie' is set to true to initiate a search. ```bash curl -X POST "http://localhost:7878/api/v3/movie" \ -H "X-Api-Key: your_radarr_api_key" \ -H "Content-Type: application/json" \ -d '{ "title": "The Matrix", "tmdbId": 603, "qualityProfileId": 1, "rootFolderPath": "/movies", "addOptions": { "searchForMovie": true }, "tags": [1, 2] }' ``` -------------------------------- ### Enable Debug Mode in Java Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md To enable debug logging for Watchlistarr, add this Java property to your command line arguments. ```bash "-Dlog.level=DEBUG" ``` -------------------------------- ### Sonarr API v3 - Add Series Source: https://context7.com/nylonee/watchlistarr/llms.txt Use this `curl` command to add a TV series to Sonarr via its API v3. Specify the title, TVDB ID, quality profile, root folder, and monitoring options. Ensure the API key and base URL are correct. ```bash # Sonarr API v3 - Add Series (internal POST request) # Endpoint: POST {baseUrl}/api/v3/series curl -X POST "http://localhost:8989/api/v3/series" \ -H "X-Api-Key: your_sonarr_api_key" \ -H "Content-Type: application/json" \ -d '{ "title": "Breaking Bad", "tvdbId": 81189, "qualityProfileId": 1, "rootFolderPath": "/tv", "addOptions": { "monitor": "all" }, "languageProfileId": 1, "tags": [1, 2] }' ``` -------------------------------- ### Convert Docker Environment Variables to Java Properties Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md This bash script converts Docker environment variables into Java properties. It's primarily used in Dockerized environments but illustrates how variables map to properties. ```bash if [ -n "$SONARR_BASE_URL" ]; then CMD+=("-Dsonarr.baseUrl=$SONARR_BASE_URL") fi ``` -------------------------------- ### Plex API - RSS Feed Source: https://context7.com/nylonee/watchlistarr/llms.txt Retrieves the Plex watchlist via an RSS feed. Requires Plex Pass and returns the last 50 items. ```APIDOC ## GET /watchlist/{rss_id} ### Description Retrieves the Plex watchlist via an RSS feed. Requires Plex Pass and returns the last 50 items. ### Method GET ### Endpoint https://rss.plex.tv/watchlist/{rss_id} ### Parameters #### Path Parameters - **rss_id** (string) - Required - Your Plex RSS feed ID. #### Query Parameters - **format** (string) - Optional - The desired output format. Set to `json` for JSON output. - **cache_buster** (string) - Optional - A random string to bypass cache. ### Response #### Success Response (200) - **items** (array) - A list of watchlist items. #### Response Example ``` https://rss.plex.tv/watchlist/your_rss_id?format=json&cache_buster=random_uuid ``` ``` -------------------------------- ### Radarr API v3 - Add Movie Source: https://context7.com/nylonee/watchlistarr/llms.txt Adds a new movie to Radarr. Requires a valid API key and a JSON payload with movie details. ```APIDOC ## POST /api/v3/movie ### Description Adds a new movie to Radarr. ### Method POST ### Endpoint {baseUrl}/api/v3/movie ### Parameters #### Headers - **X-Api-Key** (string) - Required - Your Radarr API key. - **Content-Type** (string) - Required - application/json #### Request Body - **title** (string) - Required - The title of the movie. - **tmdbId** (integer) - Required - The TMDB ID of the movie. - **qualityProfileId** (integer) - Required - The ID of the quality profile to use. - **rootFolderPath** (string) - Required - The root folder path where the movie should be stored. - **addOptions** (object) - Optional - Additional options for adding the movie. - **searchForMovie** (boolean) - Optional - Whether to search for the movie immediately. - **tags** (array of integers) - Optional - An array of tag IDs to associate with the movie. ### Request Example ```json { "title": "The Matrix", "tmdbId": 603, "qualityProfileId": 1, "rootFolderPath": "/movies", "addOptions": { "searchForMovie": true }, "tags": [1, 2] } ``` ### Response #### Success Response (200) Details of the added movie (structure not provided in source). #### Response Example (Structure not provided in source) ``` -------------------------------- ### Ping Plex to Refresh Token Source: https://context7.com/nylonee/watchlistarr/llms.txt Send a ping request to Plex to refresh token expiry. Requires your Plex token and a client identifier. ```bash curl -X GET "https://plex.tv/api/v2/ping?X-Plex-Token=your_token&X-Plex-Client-Identifier=watchlistarr" ``` -------------------------------- ### Enable Debug Mode in Docker Source: https://github.com/nylonee/watchlistarr/blob/main/CONFIGURATION.md To enable debug logging in Watchlistarr when running via Docker, add the `-e LOG_LEVEL=DEBUG` environment variable to your `docker run` command. ```bash -e LOG_LEVEL=DEBUG ``` -------------------------------- ### Plex API - Ping Token Source: https://context7.com/nylonee/watchlistarr/llms.txt Pings the Plex API to check and potentially refresh the expiry of the authentication token. ```APIDOC ## GET /api/v2/ping ### Description Pings the Plex API to check and potentially refresh the expiry of the authentication token. ### Method GET ### Endpoint https://plex.tv/api/v2/ping ### Parameters #### Query Parameters - **X-Plex-Token** (string) - Required - Your Plex authentication token. - **X-Plex-Client-Identifier** (string) - Required - A unique identifier for the client application (e.g., 'watchlistarr'). ### Response #### Success Response (200) (No specific response body detailed in source) #### Response Example ``` https://plex.tv/api/v2/ping?X-Plex-Token=your_token&X-Plex-Client-Identifier=watchlistarr ``` ``` -------------------------------- ### Delete Movie from Radarr Source: https://context7.com/nylonee/watchlistarr/llms.txt Remove a movie from Radarr. Use 'deleteFiles=true' to also remove associated media files. ```bash curl -X DELETE "http://localhost:7878/api/v3/movie/456?deleteFiles=true&addImportExclusion=false" \ -H "X-Api-Key: your_radarr_api_key" ``` -------------------------------- ### Radarr API v3 - Delete Movie Source: https://context7.com/nylonee/watchlistarr/llms.txt Deletes a movie from Radarr. Allows specifying whether to delete associated files and add to import exclusion. ```APIDOC ## DELETE /api/v3/movie/{movieId} ### Description Deletes a movie from Radarr. ### Method DELETE ### Endpoint http://localhost:7878/api/v3/movie/{movieId} ### Parameters #### Path Parameters - **movieId** (integer) - Required - The ID of the movie to delete. #### Query Parameters - **deleteFiles** (boolean) - Optional - Whether to delete the movie files. Defaults to true. - **addImportExclusion** (boolean) - Optional - Whether to add the movie to the import exclusion list. Defaults to false. #### Headers - **X-Api-Key** (string) - Required - Your Radarr API key. ### Response #### Success Response (200) (No specific response body detailed in source) #### Response Example (Structure not provided in source) ``` -------------------------------- ### Sonarr API v3 - Delete Series Source: https://context7.com/nylonee/watchlistarr/llms.txt Delete a specific series from Sonarr using its ID via a `curl` DELETE request to the API v3 series endpoint. Options are available to delete associated files and add an import list exclusion. ```bash # Sonarr API v3 - Delete Series curl -X DELETE "http://localhost:8989/api/v3/series/123?deleteFiles=true&addImportListExclusion=false" \ -H "X-Api-Key: your_sonarr_api_key" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.