{"id":13625329,"url":"https://github.com/manybothans/plex-requester-collections","last_synced_at":"2025-04-16T06:32:22.393Z","repository":{"id":165788966,"uuid":"641157126","full_name":"manybothans/plex-requester-collections","owner":"manybothans","description":"This app will tag your media in Plex, Radarr, and Sonarr with the username of the person who requested the media in Overseerr. To assist with library pruning, it can also connect to Tautulli and tag media in Radarr/Sonarr when the requester has fully watched it, or if the requester hasn't watched after a long time.","archived":false,"fork":false,"pushed_at":"2023-11-16T22:42:15.000Z","size":117,"stargazers_count":29,"open_issues_count":7,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-01T22:04:55.576Z","etag":null,"topics":["content-di","homelab","overseerr","plex","plex-media-server","plex-meta-manager","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manybothans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-15T22:46:43.000Z","updated_at":"2024-07-10T15:19:08.000Z","dependencies_parsed_at":"2023-11-17T00:02:09.664Z","dependency_job_id":"fa4d8b25-a4e5-4b3a-887b-64d9b568bc28","html_url":"https://github.com/manybothans/plex-requester-collections","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manybothans%2Fplex-requester-collections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manybothans%2Fplex-requester-collections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manybothans%2Fplex-requester-collections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manybothans%2Fplex-requester-collections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manybothans","download_url":"https://codeload.github.com/manybothans/plex-requester-collections/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223700372,"owners_count":17188306,"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":["content-di","homelab","overseerr","plex","plex-media-server","plex-meta-manager","self-hosted"],"created_at":"2024-08-01T21:01:54.046Z","updated_at":"2024-11-08T14:31:06.542Z","avatar_url":"https://github.com/manybothans.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Plex Requester Collections\n\nThis app will tag your media in Plex, Radarr, and Sonarr with the username of the person who requested the media in Overseerr. To assist with library pruning, it can also connect to Tautulli and tag media in Radarr/Sonarr when the requester has fully watched it, or if the requester hasn't watched after a long time.\n\nRead the [Logic Explained](#logic-explained) section below for a detailed explanation of how this is done.\n\n#### To Do\n\n-   Get working with Plex Meta Manager.\n-   End goal is to have a Netflix-style recommendation algorithm for my users.\n-   Add support for users who modify requests.\n-   Figure out how to have personalized Plex home screens, different by user.\n\n#### Limitations\n\n-   Only TV Shows and Movies are supported as media types for now.\n-   I'm pretty sure Overseerr needs to be using Plex for user authentication, but I haven't tested other setups.\n-   It might mess up if you've created your own collections named something like \"Movies Requested By plex_username\" or \"TV Shows Requested By plex_username\".\n-   Source code provided as is, use at your own risk.\n-   Due to limitations in Plex and Tautulli, this won't detect when something is _marked_ as watched, the user actually needs to have watched the item in a plex viewing session that was tracked in Tautulli. Working on improving this.\n\n## Installation and Usage\n\n### Local\n\nAfter downloading the source code, install dependencies using NPM:\n\n```bash\nnpm i\n```\n\nAdd a `.env` file to your root project directory that looks like this:\n\n```bash\nNODE_ENV=production # Optional - 'development' will give verbose logging.\nOVERSEERR_URL=http://overseerr-ip-address:5055\nOVERSEERR_API_KEY=********************\nPLEX_URL=http://plex-server-ip-address:32400\nPLEX_TOKEN=********************\nPLEX_INCLUDE_SECTIONS=1,2 # Optional - Comma-Separated, only process these library sections.\nRADARR_URL=http://radarr-ip-address:7878 # Optional\nRADARR_API_KEY=******************** # Optional\nSONARR_URL=http://sonarr-ip-address:8989 # Optional\nSONARR_API_KEY=******************** # Optional\nTAUTULLI_URL=http://tautulli-ip-address:8181 # Optional\nTAUTULLI_API_KEY=******************** # Optional\nFEATURE_RUN_ONCE=0 # Optional - 1:Run through once then stop. 0 (default): Repeat every 24h.\nFEATURE_CREATE_COLLECTIONS=1 # Optional - 1 (default): Make smart collection for each requester. 0: Just do the tagging.\nSTART_DELAY_MS=0 # Optional - Number of milliseconds to wait before starting the first pass. Useful if you reboot all containers at the same time.\n```\n\nBuild and run with:\n\n```bash\nnpm start\n```\n\n### Docker-Compose\n\nCreate a `docker-compose.yml` file using the following example, except with your service connection details.\n\n```yaml\nversion: \"2.1\"\nservices:\n  plex-requester-collections:\n    image: manybothans/plex-requester-collections:latest\n    container_name: plex-requester-collections\n    environment:\n      - NODE_ENV=production # Optional - 'development' will give verbose logging.\n      - OVERSEERR_URL=http://overseerr-ip-address:5055\n      - OVERSEERR_API_KEY=********************\n      - PLEX_URL=http://plex-server-ip-address:32400\n      - PLEX_TOKEN=********************\n      - PLEX_INCLUDE_SECTIONS=1,2 # Optional - Comma-Separated, only process these library sections.\n      - RADARR_URL=http://radarr-ip-address:7878 # Optional\n      - RADARR_API_KEY=******************** # Optional\n      - SONARR_URL=http://sonarr-ip-address:8989 # Optional\n      - SONARR_API_KEY=******************** # Optional\n      - TAUTULLI_URL=http://tautulli-ip-address:8181 # Optional\n      - TAUTULLI_API_KEY=******************** # Optional\n      - FEATURE_RUN_ONCE=0 # Optional - 1:Run through once then stop. 0 (default): Repeat every 24h.\n      - FEATURE_CREATE_COLLECTIONS=1 # Optional - 1 (default): Make smart collection for each requester. 0: Just do the tagging.\n      - START_DELAY_MS=0 # Optional - Number of milliseconds to wait before starting the first pass. Useful if you reboot all containers at the same time.\n    restart: unless-stopped\n\n```\n\nRun the Docker image with:\n\n```bash\ndocker-compose up -d -f /path/to/docker-compose.yml\n```\n\n## [Logic Explained](#logic-explained)\n\n-   Plex and Overseerr connection details are required, but Radarr, Sonarr, and Tautulli connection details are optional.\n-   If a user requests an item in Overseerr, tag the item in Plex with `requester:plex_username`.\n-   If there is no Overseerr request for a given item, tag the item in Plex with `not_requested`.\n-   Unless the environment variable `FEATURE_CREATE_COLLECTIONS` is set to `0`, also create smart collections in Plex for each requester that include the tagged media items, and tag the collection with `owner:plex_username`. These collections will have titles such as `Movies Requested by overseerr_displayName` or `TV Shows Requested by plex_username`, and the Sort Titles will have the prefix `zzz_` so the collections appear at the bottom of the list.\n-   If Radarr/Sonarr connection details are set in environment variables, then:\n    -   If a user requests an item in Overseerr, tag the item in Radarr/Sonarr with `requester:plex_username`.\n    -   If there is no Overseerr request for a given item, tag the item in Radarr/Sonarr with `not_requested`.\n    -   If Tautulli connection details are set in environment variables, then:\n        -   All of the viewing history related tags are removed and re-processed each pass.\n        -   If Tautulli shows that a user OTHER THAN the requester has watched the item in the last 3 months, tag the item in Radarr/Sonarr and Plex with `others_watching`.\n        -   If Tautulli shows that the requester user has fully watched an item, tag the item in Radarr/Sonarr and Plex with `requester_watched`.\n        -   If Plex shows that a media item was added over 6 months ago, and Tautulli shows that no one has watched it in 3 months, tag item in Radarr/Sonarr and Plex with `stale_request`. Note: This tag can also be set when an item is tagged as `not_requested`, in which case it just means \"stale content\".\n-   The process will run once at start, then repeat every 24 hours, unless the environment variable `FEATURE_RUN_ONCE` is set to `1` in which case it will run through once then exit.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n\n\u003c!--\nPlease make sure to update tests as appropriate.\n--\u003e\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanybothans%2Fplex-requester-collections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanybothans%2Fplex-requester-collections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanybothans%2Fplex-requester-collections/lists"}