diff --git a/VERSION b/VERSION
index 8d97db78..c1e073e5 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.17.1-develop20
+1.17.1-develop21
diff --git a/docs/metadata/builders/plex.md b/docs/metadata/builders/plex.md
index 4b918d8f..24a008ca 100644
--- a/docs/metadata/builders/plex.md
+++ b/docs/metadata/builders/plex.md
@@ -91,33 +91,34 @@ There are a couple other attributes you can have at the top level only along wit
## Sort Options
-| Sort Option | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Tracks |
-|:------------------------------------------------|:--------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
-| `title.asc`
`title.desc` | Sort by Title | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
-| `season.asc`
`season.desc` | Sort by Season | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
-| `show.asc`
`show.desc` | Sort by Show | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
-| `album_artist.asc`
`album_artist.desc` | Sort by Album Artist | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
-| `artist.asc`
`artist.desc` | Sort by Artist | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
-| `album.asc`
`album.desc` | Sort by Album | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
-| `year.asc`
`year.desc` | Sort by Year | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
-| `release.asc`
`release.desc` | Sort by Release Date (Originally Available) | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
-| `critic_rating.asc`
`critic_rating.desc` | Sort by Critic Rating | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
-| `audience_rating.asc`
`audience_rating.desc` | Sort by Audience Rating | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
-| `user_rating.asc`
`user_rating.desc` | Sort by User Rating | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| `content_rating.asc`
`content_rating.desc` | Sort by Content Rating | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
-| `duration.asc`
`duration.desc` | Sort by Duration | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
-| `progress.asc`
`progress.desc` | Sort by Progress | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
-| `played.asc`
`played.desc` | Sort by Date Last Played | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
-| `plays.asc`
`plays.desc` | Sort by Number of Plays | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ |
-| `unplayed.asc`
`unplayed.desc` | Sort by Unplayed | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
-| `episode_added.asc`
`episode_added.desc` | Sort by Last Episode Date Added | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
-| `added.asc`
`added.desc` | Sort by Date Added | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| `viewed.asc`
`viewed.desc` | Sort by Date Last Viewed | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
-| `rated.asc`
`rated.desc` | Sort by Date Last Rated | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
-| `popularity.asc`
`popularity.desc` | Sort by Popularity | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
-| `resolution.asc`
`resolution.desc` | Sort by Resolution | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
-| `bitrate.asc`
`bitrate.desc` | Sort by Bitrate | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
-| `random` | Sort by Random | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| Sort Option | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Tracks |
+|:------------------------------------------------|:----------------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
+| `title.asc`
`title.desc` | Sort by Title | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
+| `season.asc`
`season.desc` | Sort by Season | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
+| `show.asc`
`show.desc` | Sort by Show | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
+| `album_artist.asc`
`album_artist.desc` | Sort by Album Artist | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
+| `artist.asc`
`artist.desc` | Sort by Artist | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
+| `album.asc`
`album.desc` | Sort by Album | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
+| `year.asc`
`year.desc` | Sort by Year | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
+| `release.asc`
`release.desc` | Sort by Release Date (Originally Available) | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
+| `episode_release.asc`
`episode_release.desc` | Sort by Episode Release Date (Originally Available) | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
+| `critic_rating.asc`
`critic_rating.desc` | Sort by Critic Rating | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
+| `audience_rating.asc`
`audience_rating.desc` | Sort by Audience Rating | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
+| `user_rating.asc`
`user_rating.desc` | Sort by User Rating | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| `content_rating.asc`
`content_rating.desc` | Sort by Content Rating | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
+| `duration.asc`
`duration.desc` | Sort by Duration | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
+| `progress.asc`
`progress.desc` | Sort by Progress | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
+| `played.asc`
`played.desc` | Sort by Date Last Played | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
+| `plays.asc`
`plays.desc` | Sort by Number of Plays | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ |
+| `unplayed.asc`
`unplayed.desc` | Sort by Unplayed | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
+| `episode_added.asc`
`episode_added.desc` | Sort by Last Episode Date Added | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
+| `added.asc`
`added.desc` | Sort by Date Added | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| `viewed.asc`
`viewed.desc` | Sort by Date Last Viewed | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
+| `rated.asc`
`rated.desc` | Sort by Date Last Rated | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
+| `popularity.asc`
`popularity.desc` | Sort by Popularity | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
+| `resolution.asc`
`resolution.desc` | Sort by Resolution | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
+| `bitrate.asc`
`bitrate.desc` | Sort by Bitrate | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
+| `random` | Sort by Random | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
## Searches
diff --git a/docs/metadata/builders/smart.md b/docs/metadata/builders/smart.md
index 8f474c87..00a3d134 100644
--- a/docs/metadata/builders/smart.md
+++ b/docs/metadata/builders/smart.md
@@ -60,33 +60,34 @@ There are a couple other attributes you can have at the top level only along wit
## Sort Options
-| Sort Option | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Tracks |
-|:------------------------------------------------|:--------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
-| `title.asc`
`title.desc` | Sort by Title | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
-| `season.asc`
`season.desc` | Sort by Season | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
-| `show.asc`
`show.desc` | Sort by Show | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
-| `album_artist.asc`
`album_artist.desc` | Sort by Album Artist | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
-| `artist.asc`
`artist.desc` | Sort by Artist | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
-| `album.asc`
`album.desc` | Sort by Album | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
-| `year.asc`
`year.desc` | Sort by Year | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
-| `release.asc`
`release.desc` | Sort by Release Date (Originally Available) | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
-| `critic_rating.asc`
`critic_rating.desc` | Sort by Critic Rating | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
-| `audience_rating.asc`
`audience_rating.desc` | Sort by Audience Rating | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
-| `user_rating.asc`
`user_rating.desc` | Sort by User Rating | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| `content_rating.asc`
`content_rating.desc` | Sort by Content Rating | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
-| `duration.asc`
`duration.desc` | Sort by Duration | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
-| `progress.asc`
`progress.desc` | Sort by Progress | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
-| `played.asc`
`played.desc` | Sort by Date Last Played | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
-| `plays.asc`
`plays.desc` | Sort by Number of Plays | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ |
-| `unplayed.asc`
`unplayed.desc` | Sort by Unplayed | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
-| `episode_added.asc`
`episode_added.desc` | Sort by Last Episode Date Added | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
-| `added.asc`
`added.desc` | Sort by Date Added | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| `viewed.asc`
`viewed.desc` | Sort by Date Last Viewed | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
-| `rated.asc`
`rated.desc` | Sort by Date Last Rated | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
-| `popularity.asc`
`popularity.desc` | Sort by Popularity | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
-| `resolution.asc`
`resolution.desc` | Sort by Resolution | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
-| `bitrate.asc`
`bitrate.desc` | Sort by Bitrate | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
-| `random` | Sort by Random | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| Sort Option | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Tracks |
+|:------------------------------------------------|:----------------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
+| `title.asc`
`title.desc` | Sort by Title | ✅ | ✅ | ❌ | ✅ | ✅ | ✅ | ✅ |
+| `season.asc`
`season.desc` | Sort by Season | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
+| `show.asc`
`show.desc` | Sort by Show | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ |
+| `album_artist.asc`
`album_artist.desc` | Sort by Album Artist | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ |
+| `artist.asc`
`artist.desc` | Sort by Artist | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
+| `album.asc`
`album.desc` | Sort by Album | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
+| `year.asc`
`year.desc` | Sort by Year | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
+| `release.asc`
`release.desc` | Sort by Release Date (Originally Available) | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
+| `episode_release.asc`
`episode_release.desc` | Sort by Episode Release Date (Originally Available) | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
+| `critic_rating.asc`
`critic_rating.desc` | Sort by Critic Rating | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ |
+| `audience_rating.asc`
`audience_rating.desc` | Sort by Audience Rating | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
+| `user_rating.asc`
`user_rating.desc` | Sort by User Rating | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| `content_rating.asc`
`content_rating.desc` | Sort by Content Rating | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
+| `duration.asc`
`duration.desc` | Sort by Duration | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
+| `progress.asc`
`progress.desc` | Sort by Progress | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
+| `played.asc`
`played.desc` | Sort by Date Last Played | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ |
+| `plays.asc`
`plays.desc` | Sort by Number of Plays | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ |
+| `unplayed.asc`
`unplayed.desc` | Sort by Unplayed | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
+| `episode_added.asc`
`episode_added.desc` | Sort by Last Episode Date Added | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
+| `added.asc`
`added.desc` | Sort by Date Added | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| `viewed.asc`
`viewed.desc` | Sort by Date Last Viewed | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
+| `rated.asc`
`rated.desc` | Sort by Date Last Rated | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
+| `popularity.asc`
`popularity.desc` | Sort by Popularity | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ |
+| `resolution.asc`
`resolution.desc` | Sort by Resolution | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
+| `bitrate.asc`
`bitrate.desc` | Sort by Bitrate | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
+| `random` | Sort by Random | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
## Filters
diff --git a/modules/builder.py b/modules/builder.py
index b976d2aa..7139dbbd 100644
--- a/modules/builder.py
+++ b/modules/builder.py
@@ -1725,7 +1725,7 @@ class CollectionBuilder:
if plex_filter[filter_alias["sort_by"]] is None:
raise Failed(f"{self.Type} Error: sort_by attribute is blank")
if plex_filter[filter_alias["sort_by"]] not in sorts:
- raise Failed(f"{self.Type} Error: sort_by: {plex_filter[filter_alias['sort_by']]} is invalid")
+ raise Failed(f"{self.Type} Error: sort_by: {plex_filter[filter_alias['sort_by']]} is invalid. Options: {', '.join(sorts)}")
sort = plex_filter[filter_alias["sort_by"]]
filter_details += f"Sort By: {sort}\n"
diff --git a/modules/logs.py b/modules/logs.py
index e0205aad..b936c604 100644
--- a/modules/logs.py
+++ b/modules/logs.py
@@ -74,7 +74,7 @@ class MyLogger:
handler.setFormatter(logging.Formatter(text))
def add_main_handler(self):
- self.main_handler = self._get_handler(self.main_log, count=10)
+ self.main_handler = self._get_handler(self.main_log, count=9)
self.main_handler.addFilter(fmt_filter)
self._logger.addHandler(self.main_handler)
diff --git a/modules/plex.py b/modules/plex.py
index 236bb26b..a32dcab2 100644
--- a/modules/plex.py
+++ b/modules/plex.py
@@ -313,7 +313,9 @@ show_sorts = {
"title.asc": "titleSort", "title.desc": "titleSort%3Adesc",
"year.asc": "year", "year.desc": "year%3Adesc",
"originally_available.asc": "originallyAvailableAt", "originally_available.desc": "originallyAvailableAt%3Adesc",
+ "episode_originally_available.asc": "episode.originallyAvailableAt", "episode_originally_available.desc": "episode.originallyAvailableAt%3Adesc",
"release.asc": "originallyAvailableAt", "release.desc": "originallyAvailableAt%3Adesc",
+ "episode_release.asc": "episode.originallyAvailableAt", "episode_release.desc": "episode.originallyAvailableAt%3Adesc",
"critic_rating.asc": "rating", "critic_rating.desc": "rating%3Adesc",
"audience_rating.asc": "audienceRating", "audience_rating.desc": "audienceRating%3Adesc",
"user_rating.asc": "userRating", "user_rating.desc": "userRating%3Adesc",
@@ -337,7 +339,9 @@ episode_sorts = {
"show.desc": "show.titleSort%3Adesc%2Cseason.index%3AnullsLast%2Cepisode.index%3AnullsLast%2Cepisode.originallyAvailableAt%3AnullsLast%2Cepisode.titleSort%2Cepisode.id",
"year.asc": "year", "year.desc": "year%3Adesc",
"originally_available.asc": "originallyAvailableAt", "originally_available.desc": "originallyAvailableAt%3Adesc",
+ "episode_originally_available.asc": "episode.originallyAvailableAt", "episode_originally_available.desc": "episode.originallyAvailableAt%3Adesc",
"release.asc": "originallyAvailableAt", "release.desc": "originallyAvailableAt%3Adesc",
+ "episode_release.asc": "episode.originallyAvailableAt", "episode_release.desc": "episode.originallyAvailableAt%3Adesc",
"critic_rating.asc": "rating", "critic_rating.desc": "rating%3Adesc",
"audience_rating.asc": "audienceRating", "audience_rating.desc": "audienceRating%3Adesc",
"user_rating.asc": "userRating", "user_rating.desc": "userRating%3Adesc",