You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plex items carrying any label listed in EXCLUDE_LABELS are skipped on
both the apply path (ProcessAllItems, ProcessSingleItem) and the removal
path (RemoveKeywordsFromItems). Match is case-insensitive; whitespace
and empty entries in the CSV are ignored.
Motivating use case: home videos (e.g. weddings) sitting alongside real
movies in a Movies library were getting matched to unrelated TMDb titles
and tagged with their keywords. Labelarr already manipulates Plex labels,
so making a label the per-item opt-out is the natural design - set-and-
forget per item via Plex UI, no env var sprawl, survives metadata
refreshes.
Behavior:
- Config: new `ExcludeLabels []string` loaded via parseCSV.
- Processor: precomputes a lowercased map[string]struct{} once in
NewProcessor; `isExcludedByLabel(item)` is O(item.labels).
- Logging: `[INFO] EXCLUDE_LABELS active - items tagged with any of
[...] will be skipped` at startup when non-empty; per-item
`[SKIP] %s (%d) excluded by label %q (EXCLUDE_LABELS)` under
`VERBOSE_LOGGING=true` (and unconditionally on the webhook single-
item path).
- Tests: 9 sub-tests covering nil config, no-labels item, exact match,
both casing directions, multi-label, no-match, whitespace
normalization, and empty-string-in-CSV.
Also documents `MOVIE_LIBRARY_EXCLUDE` / `TV_LIBRARY_EXCLUDE` in the
README env var table (added in 1.3.0 but only mentioned in the changelog
until now).
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
# Changelog
2
2
3
+
## [Unreleased]
4
+
5
+
### Added
6
+
-`EXCLUDE_LABELS` environment variable (default empty): comma-separated list of Plex labels that mark items as opted-out of labelarr. Items carrying any of these labels are skipped during both apply and removal passes. Case-insensitive; surrounding whitespace and empty values in the CSV are ignored. Logged at startup when active (`[INFO] EXCLUDE_LABELS active - items tagged with any of [...] will be skipped`) and per skipped item under `VERBOSE_LOGGING=true`.
7
+
8
+
### Documentation
9
+
- README `Library Selection` section now documents `MOVIE_LIBRARY_EXCLUDE` and `TV_LIBRARY_EXCLUDE`, which were added in 1.3.0 but only appeared in the changelog.
Copy file name to clipboardExpand all lines: README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,14 @@ Pick one approach per media type:
92
92
| `TV_PROCESS_ALL=true` | Process all TV show libraries |
93
93
| `TV_LIBRARY_ID=2` | Process a specific TV library by ID |
94
94
95
+
Optionally narrow what gets processed within those libraries:
96
+
97
+
| Variable | Default | Description |
98
+
|----------|---------|-------------|
99
+
| `MOVIE_LIBRARY_EXCLUDE` | (empty) | Comma-separated Plex library **IDs** to skip when `MOVIE_PROCESS_ALL=true` (e.g. `MOVIE_LIBRARY_EXCLUDE=8,12`). Useful for keeping a "Home Videos" library out of the scan. |
100
+
| `TV_LIBRARY_EXCLUDE` | (empty) | Same as above for TV libraries. |
101
+
| `EXCLUDE_LABELS` | (empty) | Comma-separated **per-item opt-out** label list. Any Plex item carrying one of these labels is skipped on both apply and removal paths. Case-insensitive. Example: `EXCLUDE_LABELS=labelarr:skip,home video`. Tag the offending items in Plex (Edit -> Tags -> Labels) and labelarr will leave them alone. |
0 commit comments