Skip to content

Commit

Permalink
Merge pull request #49 from fastrack20/develop
Browse files Browse the repository at this point in the history
Added logic to exclude tags/labels in plex
  • Loading branch information
rfsbraz authored Nov 30, 2023
2 parents 4ee5c0e + 0b8d7db commit dd7112c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions app/deleterr.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,15 @@ def is_movie_actionable(
)
return False

for label in exclude.get("plex_labels", []):
if label.lower() in (
g.tag.lower() for g in plex_media_item.labels
):
logger.debug(
f"{media_data['title']} has excluded label {label}, skipping"
)
return False

if exclude.get("release_years", 0):
if (
plex_media_item.year
Expand Down
4 changes: 2 additions & 2 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Metadata is matched against the media's metadata in Plex.
| Property | Description | Example |
|----------|-------------|---------|
| `titles` | Array of titles to exclude media. | `["Forrest Gump"]` |
| `tags` | Array of tags to exclude media. | `["children", "favorite"]` |
| `plex_labels` | Array of labels to exclude media. | `["children", "favorite"]` |
| `genres` | Array of genres to exclude media. | `["horror", "thriller"]` |
| `collections` | Exclude media that are part of specific collections. | `["Marvel Cinematic Universe"]` |
| `actors` | Exclude media featuring specific actors. | `["Tom Cruise", "Brad Pitt"]` |
Expand All @@ -202,7 +202,7 @@ libraries:
...
exclude:
titles: ["Forrest Gump"]
tags: ["children", "favorite"]
plex_labels: ["children", "favorite"]
genres: ["horror", "thriller"]
collections: ["Marvel Cinematic Universe"]
actors: ["Tom Cruise", "Brad Pitt"]
Expand Down

0 comments on commit dd7112c

Please sign in to comment.