Skip to content

Commit b9ffe57

Browse files
committed
add remove option
1 parent a3117ce commit b9ffe57

File tree

4 files changed

+409
-44
lines changed

4 files changed

+409
-44
lines changed

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Automatically sync TMDb movie keywords as Plex labels - A lightweight Go applica
3636
| `LIBRARY_ID` | Plex library ID (auto-detected if not set) | - | No |
3737
| `PROCESS_ALL_MOVIE_LIBRARIES` | Process all movie libraries (set to `true` to enable) | `false` | No |
3838
| `UPDATE_FIELD` | Field to update: `labels` (default) or `genre` | `labels` | No |
39+
| `REMOVE` | Remove keywords mode: `lock` or `unlock` (runs once and exits) | - | No |
3940

4041
## 🆕 UPDATE_FIELD: Sync as Labels or Genres
4142

@@ -64,6 +65,59 @@ docker run -d --name labelarr \
6465

6566
*Genres updated and locked by Labelarr using `UPDATE_FIELD=genre`. The lock icon indicates the field is protected from automatic changes by Plex.*
6667

68+
## 🗑️ REMOVE: Clean Up TMDb Keywords
69+
70+
The `REMOVE` environment variable allows you to remove **only** TMDb keywords from the selected field while preserving all other values (like custom labels for sharing). When `REMOVE` is set, the tool runs once and exits.
71+
72+
### Remove Options
73+
74+
- `REMOVE=lock`: Removes TMDb keywords and **locks** the field to prevent Plex from updating it
75+
- `REMOVE=unlock`: Removes TMDb keywords and **unlocks** the field so metadata refresh can set new values
76+
77+
### When to Use Each Option
78+
79+
**Use `REMOVE=lock`:**
80+
81+
- When you want to permanently remove TMDb keywords but keep custom labels/genres
82+
- For users who use labels for sharing or other purposes and don't want Plex to overwrite them
83+
- When you want manual control over the field content
84+
85+
**Use `REMOVE=unlock`:**
86+
87+
- When you want to clean up and let Plex refresh metadata naturally
88+
- To reset the field to Plex's default metadata values
89+
- When switching from TMDb keywords back to standard Plex metadata
90+
91+
### Example Usage
92+
93+
#### Remove TMDb keywords from labels and lock the field
94+
95+
```bash
96+
docker run --rm \
97+
-e PLEX_SERVER=localhost \
98+
-e PLEX_PORT=32400 \
99+
-e PLEX_TOKEN=your_plex_token_here \
100+
-e TMDB_READ_ACCESS_TOKEN=your_tmdb_read_access_token \
101+
-e UPDATE_FIELD=labels \
102+
-e REMOVE=lock \
103+
nullableeth/labelarr:latest
104+
```
105+
106+
#### Remove TMDb keywords from genres and unlock for metadata refresh
107+
108+
```bash
109+
docker run --rm \
110+
-e PLEX_SERVER=localhost \
111+
-e PLEX_PORT=32400 \
112+
-e PLEX_TOKEN=your_plex_token_here \
113+
-e TMDB_READ_ACCESS_TOKEN=your_tmdb_read_access_token \
114+
-e UPDATE_FIELD=genre \
115+
-e REMOVE=unlock \
116+
nullableeth/labelarr:latest
117+
```
118+
119+
**Note:** The `--rm` flag automatically removes the container after completion since this is a one-time operation.
120+
67121
## 🔑 Getting API Keys
68122

69123
### Plex Token

README_DOCKER.md

Lines changed: 75 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ docker run -d --name labelarr \
3838
| `LIBRARY_ID` | Plex library ID (auto-detected if not set) | See Library Selection Logic below |
3939
| `PROCESS_ALL_MOVIE_LIBRARIES` | Process all movie libraries (set to `true` to enable) | `false` |
4040
| `UPDATE_FIELD` | Field to update: `labels` (default) or `genre` | `labels` | No |
41+
| `REMOVE` | Remove keywords mode: `lock` or `unlock` (runs once and exits) | - | No |
4142

4243
## Docker Compose Example
4344

@@ -86,6 +87,80 @@ services:
8687

8788
This setup ensures Labelarr only starts after Plex is healthy, avoiding initial connection errors.
8889

90+
## 🆕 UPDATE_FIELD: Sync as Labels or Genres
91+
92+
You can control whether TMDb keywords are synced as Plex **labels** (default) or **genres** by setting the `UPDATE_FIELD` environment variable:
93+
94+
- `UPDATE_FIELD=labels` (default): Syncs keywords as Plex labels (original behavior)
95+
- `UPDATE_FIELD=genre`: Syncs keywords as Plex genres
96+
97+
The chosen field will be **locked** after update to prevent Plex from overwriting it.
98+
99+
### Example Usage
100+
101+
```bash
102+
docker run -d --name labelarr \
103+
-e PLEX_SERVER=localhost \
104+
-e PLEX_PORT=32400 \
105+
-e PLEX_TOKEN=your_plex_token_here \
106+
-e TMDB_READ_ACCESS_TOKEN=your_tmdb_read_access_token \
107+
-e UPDATE_FIELD=genre \
108+
nullableeth/labelarr:latest
109+
```
110+
111+
## 🗑️ REMOVE: Clean Up TMDb Keywords
112+
113+
The `REMOVE` environment variable allows you to remove **only** TMDb keywords from the selected field while preserving all other values (like custom labels for sharing). When `REMOVE` is set, the tool runs once and exits.
114+
115+
### Remove Options
116+
117+
- `REMOVE=lock`: Removes TMDb keywords and **locks** the field to prevent Plex from updating it
118+
- `REMOVE=unlock`: Removes TMDb keywords and **unlocks** the field so metadata refresh can set new values
119+
120+
### When to Use Each Option
121+
122+
**Use `REMOVE=lock`:**
123+
124+
- When you want to permanently remove TMDb keywords but keep custom labels/genres
125+
- For users who use labels for sharing or other purposes and don't want Plex to overwrite them
126+
- When you want manual control over the field content
127+
128+
**Use `REMOVE=unlock`:**
129+
130+
- When you want to clean up and let Plex refresh metadata naturally
131+
- To reset the field to Plex's default metadata values
132+
- When switching from TMDb keywords back to standard Plex metadata
133+
134+
### Example Usage
135+
136+
#### Remove TMDb keywords from labels and lock the field
137+
138+
```bash
139+
docker run --rm \
140+
-e PLEX_SERVER=localhost \
141+
-e PLEX_PORT=32400 \
142+
-e PLEX_TOKEN=your_plex_token_here \
143+
-e TMDB_READ_ACCESS_TOKEN=your_tmdb_read_access_token \
144+
-e UPDATE_FIELD=labels \
145+
-e REMOVE=lock \
146+
nullableeth/labelarr:latest
147+
```
148+
149+
#### Remove TMDb keywords from genres and unlock for metadata refresh
150+
151+
```bash
152+
docker run --rm \
153+
-e PLEX_SERVER=localhost \
154+
-e PLEX_PORT=32400 \
155+
-e PLEX_TOKEN=your_plex_token_here \
156+
-e TMDB_READ_ACCESS_TOKEN=your_tmdb_read_access_token \
157+
-e UPDATE_FIELD=genre \
158+
-e REMOVE=unlock \
159+
nullableeth/labelarr:latest
160+
```
161+
162+
**Note:** The `--rm` flag automatically removes the container after completion since this is a one-time operation.
163+
89164
## TMDb ID Detection
90165

91166
Works with multiple sources:
@@ -152,27 +227,6 @@ The application provides detailed logging including:
152227
- **Issues**: Report bugs and feature requests
153228
- **Logs**: Check container logs for troubleshooting
154229

155-
## 🆕 UPDATE_FIELD: Sync as Labels or Genres
156-
157-
You can control whether TMDb keywords are synced as Plex **labels** (default) or **genres** by setting the `UPDATE_FIELD` environment variable:
158-
159-
- `UPDATE_FIELD=labels` (default): Syncs keywords as Plex labels (original behavior)
160-
- `UPDATE_FIELD=genre`: Syncs keywords as Plex genres
161-
162-
The chosen field will be **locked** after update to prevent Plex from overwriting it.
163-
164-
### Example Usage
165-
166-
```bash
167-
docker run -d --name labelarr \
168-
-e PLEX_SERVER=localhost \
169-
-e PLEX_PORT=32400 \
170-
-e PLEX_TOKEN=your_plex_token_here \
171-
-e TMDB_READ_ACCESS_TOKEN=your_tmdb_read_access_token \
172-
-e UPDATE_FIELD=genre \
173-
nullableeth/labelarr:latest
174-
```
175-
176230
---
177231

178232
**Tags**: plex, tmdb, automation, movies, labels, docker, go, selfhosted

example/naming.png

101 KB
Loading

0 commit comments

Comments
 (0)