diff --git a/VERSION b/VERSION
index 1f5743d3..c254b3b9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.17.3-develop19
+1.17.3-develop20
diff --git a/docs/metadata/builders/plex.md b/docs/metadata/builders/plex.md
index 6de53fc5..ddaf336a 100644
--- a/docs/metadata/builders/plex.md
+++ b/docs/metadata/builders/plex.md
@@ -113,6 +113,7 @@ There are a couple other attributes you can have at the top level only along wit
|:-----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `limit` | **Description:** The max number of item for the search.
**Default:** `all`
**Values:** `all` or a number greater than 0 |
| `sort_by` | **Description:** This will control how the filter is sorted in your library.
**Default:** `random`
**Values:** Any sort options for your search type in the [Sorts Options Table](#sort-options) |
+| `type` | **PLAYLIST SEARCHES ONLY** **Description:** Allows different types of media to be searched for.
**Default:** `movie`, `show`, or `artist` depending on library type
**Values:** `movie`, `show`, `season`, `episode`, `artist`, `album` or `track`
| `validate` | **Description:** Determines if a collection/playlist will fail on a validation error
**Default:** `true`
**Values**: `true` or `false` |
## Sort Options
diff --git a/modules/builder.py b/modules/builder.py
index ba80e40f..fe93bb83 100644
--- a/modules/builder.py
+++ b/modules/builder.py
@@ -1747,7 +1747,13 @@ class CollectionBuilder:
raise Failed(f"{self.Type} Error: Cannot have more then one base")
if self.builder_level == "item":
- if self.library.is_show:
+ if "type" in filter_alias:
+ if plex_filter[filter_alias["type"]] is None:
+ raise Failed(f"{self.Type} Error: type attribute is blank")
+ if plex_filter[filter_alias["type"]] not in plex.sort_types:
+ raise Failed(f"{self.Type} Error: type: {plex_filter[filter_alias['type']]} is invalid. Options: {', '.join(plex.sort_types)}")
+ sort_type = plex_filter[filter_alias["type"]]
+ elif self.library.is_show:
sort_type = "show"
elif self.library.is_music:
sort_type = "artist"
diff --git a/modules/overlays.py b/modules/overlays.py
index 7c8a502d..2f69365f 100644
--- a/modules/overlays.py
+++ b/modules/overlays.py
@@ -207,10 +207,10 @@ class Overlays:
if f"<<{format_var}" in full_text and format_var == "originally_available[":
mod = re.search("<>", full_text).group(1)
format_var = "originally_available"
- elif f"<<{format_var}>>" in full_text and format_var.endswith((m for m in overlay.double_mods)):
+ elif f"<<{format_var}>>" in full_text and format_var.endswith(tuple(m for m in overlay.double_mods)):
mod = format_var[-2:]
format_var = format_var[:-2]
- elif f"<<{format_var}>>" in full_text and format_var.endswith((m for m in overlay.single_mods)):
+ elif f"<<{format_var}>>" in full_text and format_var.endswith(tuple(m for m in overlay.single_mods)):
mod = format_var[-1]
format_var = format_var[:-1]
elif f"<<{format_var}>>" in full_text: