[113] added has_edition filter

pull/1331/head
meisnate12 2 years ago
parent 0e9e2b09f2
commit 5d2aeb770b

@ -1 +1 @@
1.18.3-develop112
1.18.3-develop113

@ -128,8 +128,9 @@ Boolean Filters have no modifiers.
### Attribute
| Boolean Filters | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Track |
|:--------------------|:------------------------------------------------------------|:-------:|:-------------------:|:-------------------:|:--------:|:--------:|:--------:|:--------:|
|:-------------------|:------------------------------------------------------------|:-------:|:-------------------:|:-------------------:|:--------:|:--------:|:--------:|:--------:|
| `has_collection` | Matches every item that has or does not have a collection | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| `has_edition` | Matches every item that has or does not have an edition | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| `has_dolby_vision` | Matches every item that has or does not have a dolby vision | &#9989; | &#9989;<sup>1</sup> | &#9989;<sup>1</sup> | &#9989; | &#10060; | &#10060; | &#10060; |
| `has_overlay` | Matches every item that has or does not have an overlay | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#10060; |

@ -84,7 +84,7 @@ filters_by_type = {
"show_artist": ["folder"],
"show_season": ["episodes"],
"artist_album": ["tracks"],
"movie": ["edition"],
"movie": ["edition", "has_edition"],
"show": ["seasons", "tmdb_status", "tmdb_type", "origin_country", "network", "first_episode_aired", "last_episode_aired", "last_episode_aired_or_never"],
"artist": ["albums"],
"album": ["record_label"]
@ -113,7 +113,7 @@ tag_filters = [
"origin_country", "writer", "resolution", "audio_language", "subtitle_language", "tmdb_keyword", "tmdb_genre", "imdb_keyword"
]
tag_modifiers = ["", ".not", ".regex", ".count_gt", ".count_gte", ".count_lt", ".count_lte"]
boolean_filters = ["has_collection", "has_overlay", "has_dolby_vision"]
boolean_filters = ["has_collection", "has_edition", "has_overlay", "has_dolby_vision"]
date_filters = ["release", "added", "last_played", "first_episode_aired", "last_episode_aired", "last_episode_aired_or_never"]
date_modifiers = ["", ".not", ".before", ".after", ".regex"]
number_filters = [

@ -1572,6 +1572,8 @@ class Plex(Library):
filter_check = False
if filter_attr == "has_collection":
filter_check = len(item.collections) > 0
elif filter_attr == "has_edition":
filter_check = True if item.edition else False
elif filter_attr == "has_overlay":
for label in self.item_labels(item):
if label.tag.lower().endswith(" overlay") or label.tag.lower() == "overlay":

Loading…
Cancel
Save