{"id":26760655,"url":"https://github.com/varthe/Redirecterr","last_synced_at":"2025-03-28T18:01:45.801Z","repository":{"id":263297286,"uuid":"889916205","full_name":"varthe/Redirecterr","owner":"varthe","description":"Filter and redirect Overseerr/Jellyseerr requests based on requester, keywords, age ratings, and more. Supports routing to multiple instances simultaneously.","archived":false,"fork":false,"pushed_at":"2025-02-21T21:39:43.000Z","size":198,"stargazers_count":59,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T19:44:22.996Z","etag":null,"topics":["arrs","filter","filtering","filters","jellyfin","jellyseerr","media","mediaserver","overseerr","plex","plex-media-server","radarr","sonarr"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/varthe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-17T15:12:47.000Z","updated_at":"2025-03-25T19:50:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6685d5a-d38f-4c5a-b308-9a2e39c2ce86","html_url":"https://github.com/varthe/Redirecterr","commit_stats":null,"previous_names":["varthe/redirecterr"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varthe%2FRedirecterr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varthe%2FRedirecterr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varthe%2FRedirecterr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varthe%2FRedirecterr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/varthe","download_url":"https://codeload.github.com/varthe/Redirecterr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246076834,"owners_count":20719892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arrs","filter","filtering","filters","jellyfin","jellyseerr","media","mediaserver","overseerr","plex","plex-media-server","radarr","sonarr"],"created_at":"2025-03-28T18:01:05.664Z","updated_at":"2025-03-28T18:01:45.775Z","avatar_url":"https://github.com/varthe.png","language":"JavaScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\n# Redirecterr\nFilter and redirect Overseerr/Jellyseerr requests based on requester, keywords, age ratings, and more. Supports routing to multiple instances simultaneously.\n## Getting Started\n\n### Docker Compose\n\nUse the following `docker-compose.yaml` to deploy the Redirecterr service:\n\n```yaml\nservices:\n  redirecterr:\n    image: varthe/redirecterr:latest\n    container_name: redirecterr\n    hostname: redirecterr\n    ports:\n      - 8481:8481\n    volumes:\n      - /path/to/config:/config\n      - /path/to/logs:/logs\n    environment:\n      - LOG_LEVEL=info\n```\n\n### Webhook setup\n\nIn order for Redirecterr to work you need to disable automatic request approval for your users.\n\nThen, in your seerr navigate to **Settings -\u003e Notifications -\u003e Webhook** and configure the following:\n\n- **Enable Agent**: Enabled\n- **Webhook URL**: `http://redirecterr:8481/webhook`\n- **JSON Payload**:\n  ```json\n  {\n      \"notification_type\": \"{{notification_type}}\",\n      \"media\": {\n          \"media_type\": \"{{media_type}}\",\n          \"tmdbId\": \"{{media_tmdbid}}\",\n          \"tvdbId\": \"{{media_tvdbid}}\",\n          \"status\": \"{{media_status}}\",\n          \"status4k\": \"{{media_status4k}}\"\n      },\n      \"request\": {\n          \"request_id\": \"{{request_id}}\",\n          \"requestedBy_email\": \"{{requestedBy_email}}\",\n          \"requestedBy_username\": \"{{requestedBy_username}}\",\n          \"requestedBy_avatar\": \"{{requestedBy_avatar}}\"\n      },\n      \"{{extra}}\": []\n  }\n  ```\n- **Notification Types**: Select **Request Pending Approval**\n\n## Configuration Overview\n\nThe configuration for Redirecterr is defined in `config.yaml`. Below is a breakdown of the required and optional settings.\n\n### Required Settings\n\n- **`overseerr_url`**: The base URL of your Overseerr instance.\n- **`overseerr_api_token`**: The API token for your Overseerr instance.\n\n### Fallback Settings\n- **`approve_on_no_match`**: When no filters match, the request is approved automatically and handled by Overseerr according to its default settings. (Recommended)\n### Instances\n\nDefine your Radarr and Sonarr instances in this section. You can name the instances as needed.\n\n- **`server_id`** (Required): The ID of the instance as shown in **Settings -\u003e Services** in Overseerr. IDs start at 0 and increment sequentially from left to right (see image below).\n- **`root_folder`** (Required): The path to the root folder for the instance, as configured in its settings.\n- **`quality_profile_id`** (Optional): Overrides the default quality profile set in Overseerr. If not provided, the default profile will be used. To find the profile ID, open your browser and use the following URL, replacing `\u003curl\u003e` with your arr instance's URL and `\u003capi-key\u003e` with its API key:\n  ```\n  http://\u003curl\u003e/api/v3/qualityProfile?apiKey=\u003capi-key\u003e\n  ```\n  This returns a JSON response listing all available quality profiles and their IDs. The ID can be found at the very bottom of the response.\n- **`approve`** (Optional): Automatically approves requests by default. To disable, set this flag to `False` in the configuration.\n  \n![arrs](https://github.com/user-attachments/assets/a7a60d91-0f24-42a9-bbe1-ea4f1c945e6a)\n\n### Filters\n\nDefine your request filters in this section.\n\n- **`media_type`**: Specifies the type of media, either `\"movie\"` or `\"tv\"`.\n- **`is_not_4k`**: Should only apply to non-4k requests\n- **`is_4k`**: Should only apply to 4k requests\n- **`conditions`**: A set of fields and values used to filter requests. Refer to [testData.js](https://github.com/varthe/Redirecterr/blob/main/testData.js) for examples of request objects. Each field within `conditions` can be:\n    - A **single value**: Matches if the value is present in the request.\n    - A **list of values**: Matches if any value in the list is present in the request.\n    - An **`exclude`** object: Used to exclude specific values. The `exclude`` object can contain either a single value or a list of values. The filter will match if none of the specified values are present in the request.\n\n- **`apply`**: A list of instance names (defined in the **Instances** section) to which the request will be sent.\n  \nRedirecterr processes filters sequentially and will apply the first matching filter it encounters. Make sure to order your filters appropriately to get the desired behavior.\n\n### Sample `config.yaml`\n\n```yaml\noverseerr_url: \"https://my-overseerr-instance.com\"\noverseerr_api_token: \"YOUR_API_TOKEN\"\n\napprove_on_no_match: True\n\ninstances:\n  radarr: # Custom instance name\n    server_id: 0\n    root_folder: \"/mnt/plex/Movies\"\n  radarr4k: # Custom instance name\n    server_id: 1\n    root_folder: \"/mnt/plex/Movies - 4K\"\n  radarr_anime: # Custom instance name\n    server_id: 2\n    root_folder: \"/mnt/plex/Movies - Anime\"\n    quality_profile_id: 2 # Optional\n    approve: false # Optional\n  sonarr: # Custom instance name\n    server_id: 0\n    root_folder: \"/mnt/plex/Shows\"\n\nfilters:\n  - media_type: movie\n    conditions:\n      keywords: anime # Match if keyword \"anime\" is present\n      requestedBy_username: varthe # Match if requested by \"varthe\"\n      # requestedBy_email: \"\"\n    apply: radarr_anime # Send request to \"radarr_anime\"\n  - media_type: movie\n    conditions:\n      keywords: # Exclude requests with keywords \"anime\" or \"animation\"\n        exclude:\n          - anime\n          - animation\n    apply: # Send requests to \"radarr\" and \"radarr4k\"\n      - radarr\n      - radarr4k\n  - media_type: tv\n    conditions:\n      genres: # Match if genre is \"adventure\" or \"comedy\"\n        - adventure\n        - comedy\n      contentRatings: # Match if content rating is \"12\" or \"16\"\n        - 12\n        - 16\n    apply: sonarr # Send request to \"sonarr\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarthe%2FRedirecterr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvarthe%2FRedirecterr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarthe%2FRedirecterr/lists"}