Skip to content

Commit 8022198

Browse files
committed
bug fixes, support for non-requesters
1 parent 3daccec commit 8022198

File tree

4 files changed

+186
-66
lines changed

4 files changed

+186
-66
lines changed

.vscode/settings.json

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,6 @@
22
"editor.defaultFormatter": "esbenp.prettier-vscode",
33
"yaml.format.enable": true,
44
"editor.indentSize": "tabSize",
5-
"[yaml]": {
6-
"editor.formatOnSave": false,
7-
"editor.tabSize": 2
8-
},
9-
"[markdown]": {
10-
"editor.formatOnSave": false,
11-
"editor.tabSize": 2
12-
},
13-
"[dockercompose]": {
14-
"editor.formatOnSave": false,
15-
"editor.tabSize": 2
16-
},
17-
"search.exclude": {
18-
"**/node_modules": true
19-
},
205
"search.useIgnoreFiles": true,
216
"editor.formatOnSave": true,
227
"editor.formatOnPaste": true,
@@ -32,6 +17,25 @@
3217
"yaml.schemas": {
3318
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": "file:///Users/jlatimer/Code/plex-requester-collections/docker-compose-example.yml"
3419
},
20+
"[yaml]": {
21+
"editor.formatOnSave": false,
22+
"editor.tabSize": 2
23+
},
24+
"[markdown]": {
25+
"editor.formatOnSave": false,
26+
"editor.tabSize": 2
27+
},
28+
"[]": {
29+
"editor.formatOnSave": false,
30+
"editor.tabSize": 2
31+
},
32+
"[dockercompose]": {
33+
"editor.formatOnSave": false,
34+
"editor.tabSize": 2
35+
},
36+
"search.exclude": {
37+
"**/node_modules": true
38+
},
3539
"cSpell.words": [
3640
"Adesc",
3741
"Akte",

README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The process will go through once at start, then repeat every 24 hours. Make sure
1010

1111
- Get working with Plex Meta Manager.
1212
- End goal is to have a Netflix-style recommendation algorithm for my users.
13-
- Add support for users who modify requests, or who haven't requested by are actively watching the content.
13+
- Add support for users who modify requests.
1414
- Figure out how to have personalized Plex home screens, different by user.
1515

1616
#### Limitations
@@ -48,6 +48,7 @@ TAUTULLI_URL=http://tautulli-ip-address:8181 # Optional
4848
TAUTULLI_API_KEY=******************** # Optional
4949
FEATURE_RUN_ONCE=0 # Optional - 1:Run through once then stop. 0 (default): Repeat every 24h.
5050
FEATURE_CREATE_COLLECTIONS=1 # Optional - 1 (default): Make smart collection for each requester. 0: Just do the tagging.
51+
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.
5152
```
5253

5354
Build and run with:
@@ -63,25 +64,26 @@ Create a `docker-compose.yml` file using the following example, except with your
6364
```yaml
6465
version: "2.1"
6566
services:
66-
plex-requester-collections:
67-
image: manybothans/plex-requester-collections:latest
68-
container_name: plex-requester-collections
69-
environment:
70-
- NODE_ENV=production # Optional - 'development' will give verbose logging.
71-
- OVERSEERR_URL=http://overseerr-ip-address:5055
72-
- OVERSEERR_API_KEY=********************
73-
- PLEX_URL=http://plex-server-ip-address:32400
74-
- PLEX_TOKEN=********************
75-
- PLEX_INCLUDE_SECTIONS=1,2 # Optional - Comma-Separated, only process these library sections.
76-
- RADARR_URL=http://radarr-ip-address:7878 # Optional
77-
- RADARR_API_KEY=******************** # Optional
78-
- SONARR_URL=http://sonarr-ip-address:8989 # Optional
79-
- SONARR_API_KEY=******************** # Optional
80-
- TAUTULLI_URL=http://tautulli-ip-address:8181 # Optional
81-
- TAUTULLI_API_KEY=******************** # Optional
82-
- FEATURE_RUN_ONCE=0 # Optional - 1:Run through once then stop. 0 (default): Repeat every 24h.
83-
- FEATURE_CREATE_COLLECTIONS=1 # Optional - 1 (default): Make smart collection for each requester. 0: Just do the tagging.
84-
restart: unless-stopped
67+
plex-requester-collections:
68+
image: manybothans/plex-requester-collections:latest
69+
container_name: plex-requester-collections
70+
environment:
71+
- NODE_ENV=production # Optional - 'development' will give verbose logging.
72+
- OVERSEERR_URL=http://overseerr-ip-address:5055
73+
- OVERSEERR_API_KEY=********************
74+
- PLEX_URL=http://plex-server-ip-address:32400
75+
- PLEX_TOKEN=********************
76+
- PLEX_INCLUDE_SECTIONS=1,2 # Optional - Comma-Separated, only process these library sections.
77+
- RADARR_URL=http://radarr-ip-address:7878 # Optional
78+
- RADARR_API_KEY=******************** # Optional
79+
- SONARR_URL=http://sonarr-ip-address:8989 # Optional
80+
- SONARR_API_KEY=******************** # Optional
81+
- TAUTULLI_URL=http://tautulli-ip-address:8181 # Optional
82+
- TAUTULLI_API_KEY=******************** # Optional
83+
- FEATURE_RUN_ONCE=0 # Optional - 1:Run through once then stop. 0 (default): Repeat every 24h.
84+
- FEATURE_CREATE_COLLECTIONS=1 # Optional - 1 (default): Make smart collection for each requester. 0: Just do the tagging.
85+
- 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.
86+
restart: unless-stopped
8587
```
8688
8789
Run the Docker image with:
@@ -98,11 +100,14 @@ docker-compose up -d -f /path/to/docker-compose.yml
98100
- 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 plex_username` 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.
99101
- If Tautulli and Radarr/Sonarr connection details are set in environment variables:
100102
- If a user requests an item in Overseerr, tag the item in Radarr/Sonarr with `requester:plex_username`.
103+
- 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 with `others_watching`.
104+
- If Tautulli later shows that non-requester users have not watched the item in the last 3 months, remove the `others_watching` tag from the item in Radarr/Sonarr.
101105
- If Tautulli shows that the requester user has fully watched an item, tag the item in Radarr/Sonarr with `requester_watched`.
102106
- If Tautulli later shows that the requester has no longer fully watched an item (e.g. they had finished a show but new episodes were added), remove the `requester_watched` tag from the item in Radarr/Sonarr.
103-
- If Overseerr shows that a requested media item was downloaded over 6 months ago, and Tautulli shows that the requester user hasn't watched the item in over 3 months, tag item in Radarr/Sonarr with `stale_request`.
107+
- If Overseerr shows that a requested media item was downloaded over 6 months ago, and Tautulli shows that the requester user hasn't watched the item in over 3 months, AND no one else has watched it in 3 months, tag item in Radarr/Sonarr with `stale_request`.
104108
- If Tautulli later shows that the requester user has started watching the item, remove the `stale_request` tag from item in Radarr/Sonarr.
105109
- 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.
110+
- Right now the system will only touch media items that exist both in Plex and as requests in Overseerr. If you add items to Plex directly, or bypass Overseerr and request in Radarr/Sonarr directly, those items won't be processed.
106111

107112
## Contributing
108113

docker-compose-example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ services:
1818
- TAUTULLI_API_KEY=******************** # Optional
1919
- FEATURE_RUN_ONCE=0 # Optional - 1:Run through once then stop. 0 (default): Repeat every 24h.
2020
- FEATURE_CREATE_COLLECTIONS=1 # Optional - 1 (default): Make smart collection for each requester. 0: Just do the tagging.
21+
- 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.
2122
restart: unless-stopped

0 commit comments

Comments
 (0)