[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

@ -127,11 +127,12 @@ Boolean Filters have no modifiers.
### Attribute ### Attribute
| Boolean Filters | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Track | | Boolean Filters | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Track |
|:--------------------|:------------------------------------------------------------|:-------:|:-------------------:|:-------------------:|:--------:|:--------:|:--------:|:--------:| |:-------------------|:------------------------------------------------------------|:-------:|:-------------------:|:-------------------:|:--------:|:--------:|:--------:|:--------:|
| `has_collection` | Matches every item that has or does not have a collection | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | `has_collection` | Matches every item that has or does not have a collection | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| `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_edition` | Matches every item that has or does not have an edition | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; |
| `has_overlay` | Matches every item that has or does not have an overlay | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#10060; | | `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; |
<sup>1</sup> Filters using the special `episodes` [filter](#special-filters) with the [default percent](details/definition). <sup>1</sup> Filters using the special `episodes` [filter](#special-filters) with the [default percent](details/definition).

@ -84,7 +84,7 @@ filters_by_type = {
"show_artist": ["folder"], "show_artist": ["folder"],
"show_season": ["episodes"], "show_season": ["episodes"],
"artist_album": ["tracks"], "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"], "show": ["seasons", "tmdb_status", "tmdb_type", "origin_country", "network", "first_episode_aired", "last_episode_aired", "last_episode_aired_or_never"],
"artist": ["albums"], "artist": ["albums"],
"album": ["record_label"] "album": ["record_label"]
@ -113,7 +113,7 @@ tag_filters = [
"origin_country", "writer", "resolution", "audio_language", "subtitle_language", "tmdb_keyword", "tmdb_genre", "imdb_keyword" "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"] 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_filters = ["release", "added", "last_played", "first_episode_aired", "last_episode_aired", "last_episode_aired_or_never"]
date_modifiers = ["", ".not", ".before", ".after", ".regex"] date_modifiers = ["", ".not", ".before", ".after", ".regex"]
number_filters = [ number_filters = [

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

Loading…
Cancel
Save