[21] new plex_search sort option

pull/961/head
meisnate12 2 years ago
parent 09957ce390
commit 1397f88f6a

@ -1 +1 @@
1.17.1-develop20 1.17.1-develop21

@ -91,33 +91,34 @@ There are a couple other attributes you can have at the top level only along wit
## Sort Options ## Sort Options
| Sort Option | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Tracks | | Sort Option | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Tracks |
|:------------------------------------------------|:--------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| |:------------------------------------------------|:----------------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
| `title.asc`<br>`title.desc` | Sort by Title | &#9989; | &#9989; | &#10060; | &#9989; | &#9989; | &#9989; | &#9989; | | `title.asc`<br>`title.desc` | Sort by Title | &#9989; | &#9989; | &#10060; | &#9989; | &#9989; | &#9989; | &#9989; |
| `season.asc`<br>`season.desc` | Sort by Season | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | | `season.asc`<br>`season.desc` | Sort by Season | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; |
| `show.asc`<br>`show.desc` | Sort by Show | &#10060; | &#10060; | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; | | `show.asc`<br>`show.desc` | Sort by Show | &#10060; | &#10060; | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; |
| `album_artist.asc`<br>`album_artist.desc` | Sort by Album Artist | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | &#9989; | | `album_artist.asc`<br>`album_artist.desc` | Sort by Album Artist | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | &#9989; |
| `artist.asc`<br>`artist.desc` | Sort by Artist | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | | `artist.asc`<br>`artist.desc` | Sort by Artist | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; |
| `album.asc`<br>`album.desc` | Sort by Album | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | | `album.asc`<br>`album.desc` | Sort by Album | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; |
| `year.asc`<br>`year.desc` | Sort by Year | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; | | `year.asc`<br>`year.desc` | Sort by Year | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; |
| `release.asc`<br>`release.desc` | Sort by Release Date (Originally Available) | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; | | `release.asc`<br>`release.desc` | Sort by Release Date (Originally Available) | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; |
| `critic_rating.asc`<br>`critic_rating.desc` | Sort by Critic Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; | | `episode_release.asc`<br>`episode_release.desc` | Sort by Episode Release Date (Originally Available) | &#10060; | &#9989; | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; |
| `audience_rating.asc`<br>`audience_rating.desc` | Sort by Audience Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `critic_rating.asc`<br>`critic_rating.desc` | Sort by Critic Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; |
| `user_rating.asc`<br>`user_rating.desc` | Sort by User Rating | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | | `audience_rating.asc`<br>`audience_rating.desc` | Sort by Audience Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `content_rating.asc`<br>`content_rating.desc` | Sort by Content Rating | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | | `user_rating.asc`<br>`user_rating.desc` | Sort by User Rating | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; |
| `duration.asc`<br>`duration.desc` | Sort by Duration | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#9989; | | `content_rating.asc`<br>`content_rating.desc` | Sort by Content Rating | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; |
| `progress.asc`<br>`progress.desc` | Sort by Progress | &#10060; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `duration.asc`<br>`duration.desc` | Sort by Duration | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#9989; |
| `played.asc`<br>`played.desc` | Sort by Date Last Played | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | &#9989; | &#9989; | | `progress.asc`<br>`progress.desc` | Sort by Progress | &#10060; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `plays.asc`<br>`plays.desc` | Sort by Number of Plays | &#9989; | &#10060; | &#10060; | &#9989; | &#9989; | &#9989; | &#9989; | | `played.asc`<br>`played.desc` | Sort by Date Last Played | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | &#9989; | &#9989; |
| `unplayed.asc`<br>`unplayed.desc` | Sort by Unplayed | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | | `plays.asc`<br>`plays.desc` | Sort by Number of Plays | &#9989; | &#10060; | &#10060; | &#9989; | &#9989; | &#9989; | &#9989; |
| `episode_added.asc`<br>`episode_added.desc` | Sort by Last Episode Date Added | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | | `unplayed.asc`<br>`unplayed.desc` | Sort by Unplayed | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; |
| `added.asc`<br>`added.desc` | Sort by Date Added | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | | `episode_added.asc`<br>`episode_added.desc` | Sort by Last Episode Date Added | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; |
| `viewed.asc`<br>`viewed.desc` | Sort by Date Last Viewed | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `added.asc`<br>`added.desc` | Sort by Date Added | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; |
| `rated.asc`<br>`rated.desc` | Sort by Date Last Rated | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | | `viewed.asc`<br>`viewed.desc` | Sort by Date Last Viewed | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `popularity.asc`<br>`popularity.desc` | Sort by Popularity | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | | `rated.asc`<br>`rated.desc` | Sort by Date Last Rated | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; |
| `resolution.asc`<br>`resolution.desc` | Sort by Resolution | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `popularity.asc`<br>`popularity.desc` | Sort by Popularity | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; |
| `bitrate.asc`<br>`bitrate.desc` | Sort by Bitrate | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#9989; | | `resolution.asc`<br>`resolution.desc` | Sort by Resolution | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `random` | Sort by Random | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | | `bitrate.asc`<br>`bitrate.desc` | Sort by Bitrate | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#9989; |
| `random` | Sort by Random | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; |
## Searches ## Searches

@ -60,33 +60,34 @@ There are a couple other attributes you can have at the top level only along wit
## Sort Options ## Sort Options
| Sort Option | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Tracks | | Sort Option | Description | Movies | Shows | Seasons | Episodes | Artists | Albums | Tracks |
|:------------------------------------------------|:--------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:| |:------------------------------------------------|:----------------------------------------------------|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
| `title.asc`<br>`title.desc` | Sort by Title | &#9989; | &#9989; | &#10060; | &#9989; | &#9989; | &#9989; | &#9989; | | `title.asc`<br>`title.desc` | Sort by Title | &#9989; | &#9989; | &#10060; | &#9989; | &#9989; | &#9989; | &#9989; |
| `season.asc`<br>`season.desc` | Sort by Season | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | | `season.asc`<br>`season.desc` | Sort by Season | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; |
| `show.asc`<br>`show.desc` | Sort by Show | &#10060; | &#10060; | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; | | `show.asc`<br>`show.desc` | Sort by Show | &#10060; | &#10060; | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; |
| `album_artist.asc`<br>`album_artist.desc` | Sort by Album Artist | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | &#9989; | | `album_artist.asc`<br>`album_artist.desc` | Sort by Album Artist | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | &#9989; |
| `artist.asc`<br>`artist.desc` | Sort by Artist | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | | `artist.asc`<br>`artist.desc` | Sort by Artist | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; |
| `album.asc`<br>`album.desc` | Sort by Album | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | | `album.asc`<br>`album.desc` | Sort by Album | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; |
| `year.asc`<br>`year.desc` | Sort by Year | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; | | `year.asc`<br>`year.desc` | Sort by Year | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; |
| `release.asc`<br>`release.desc` | Sort by Release Date (Originally Available) | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; | | `release.asc`<br>`release.desc` | Sort by Release Date (Originally Available) | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; |
| `critic_rating.asc`<br>`critic_rating.desc` | Sort by Critic Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; | | `episode_release.asc`<br>`episode_release.desc` | Sort by Episode Release Date (Originally Available) | &#10060; | &#9989; | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; |
| `audience_rating.asc`<br>`audience_rating.desc` | Sort by Audience Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `critic_rating.asc`<br>`critic_rating.desc` | Sort by Critic Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#9989; | &#10060; |
| `user_rating.asc`<br>`user_rating.desc` | Sort by User Rating | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | | `audience_rating.asc`<br>`audience_rating.desc` | Sort by Audience Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `content_rating.asc`<br>`content_rating.desc` | Sort by Content Rating | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | | `user_rating.asc`<br>`user_rating.desc` | Sort by User Rating | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; |
| `duration.asc`<br>`duration.desc` | Sort by Duration | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#9989; | | `content_rating.asc`<br>`content_rating.desc` | Sort by Content Rating | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; |
| `progress.asc`<br>`progress.desc` | Sort by Progress | &#10060; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `duration.asc`<br>`duration.desc` | Sort by Duration | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#9989; |
| `played.asc`<br>`played.desc` | Sort by Date Last Played | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | &#9989; | &#9989; | | `progress.asc`<br>`progress.desc` | Sort by Progress | &#10060; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `plays.asc`<br>`plays.desc` | Sort by Number of Plays | &#9989; | &#10060; | &#10060; | &#9989; | &#9989; | &#9989; | &#9989; | | `played.asc`<br>`played.desc` | Sort by Date Last Played | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | &#9989; | &#9989; |
| `unplayed.asc`<br>`unplayed.desc` | Sort by Unplayed | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | | `plays.asc`<br>`plays.desc` | Sort by Number of Plays | &#9989; | &#10060; | &#10060; | &#9989; | &#9989; | &#9989; | &#9989; |
| `episode_added.asc`<br>`episode_added.desc` | Sort by Last Episode Date Added | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | | `unplayed.asc`<br>`unplayed.desc` | Sort by Unplayed | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; |
| `added.asc`<br>`added.desc` | Sort by Date Added | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | | `episode_added.asc`<br>`episode_added.desc` | Sort by Last Episode Date Added | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; |
| `viewed.asc`<br>`viewed.desc` | Sort by Date Last Viewed | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `added.asc`<br>`added.desc` | Sort by Date Added | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; |
| `rated.asc`<br>`rated.desc` | Sort by Date Last Rated | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | | `viewed.asc`<br>`viewed.desc` | Sort by Date Last Viewed | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `popularity.asc`<br>`popularity.desc` | Sort by Popularity | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; | | `rated.asc`<br>`rated.desc` | Sort by Date Last Rated | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; |
| `resolution.asc`<br>`resolution.desc` | Sort by Resolution | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `popularity.asc`<br>`popularity.desc` | Sort by Popularity | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#10060; | &#9989; |
| `bitrate.asc`<br>`bitrate.desc` | Sort by Bitrate | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#9989; | | `resolution.asc`<br>`resolution.desc` | Sort by Resolution | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `random` | Sort by Random | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | | `bitrate.asc`<br>`bitrate.desc` | Sort by Bitrate | &#9989; | &#10060; | &#10060; | &#9989; | &#10060; | &#10060; | &#9989; |
| `random` | Sort by Random | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; |
## Filters ## Filters

@ -1725,7 +1725,7 @@ class CollectionBuilder:
if plex_filter[filter_alias["sort_by"]] is None: if plex_filter[filter_alias["sort_by"]] is None:
raise Failed(f"{self.Type} Error: sort_by attribute is blank") raise Failed(f"{self.Type} Error: sort_by attribute is blank")
if plex_filter[filter_alias["sort_by"]] not in sorts: 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"]] sort = plex_filter[filter_alias["sort_by"]]
filter_details += f"Sort By: {sort}\n" filter_details += f"Sort By: {sort}\n"

@ -74,7 +74,7 @@ class MyLogger:
handler.setFormatter(logging.Formatter(text)) handler.setFormatter(logging.Formatter(text))
def add_main_handler(self): 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.main_handler.addFilter(fmt_filter)
self._logger.addHandler(self.main_handler) self._logger.addHandler(self.main_handler)

@ -313,7 +313,9 @@ show_sorts = {
"title.asc": "titleSort", "title.desc": "titleSort%3Adesc", "title.asc": "titleSort", "title.desc": "titleSort%3Adesc",
"year.asc": "year", "year.desc": "year%3Adesc", "year.asc": "year", "year.desc": "year%3Adesc",
"originally_available.asc": "originallyAvailableAt", "originally_available.desc": "originallyAvailableAt%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", "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", "critic_rating.asc": "rating", "critic_rating.desc": "rating%3Adesc",
"audience_rating.asc": "audienceRating", "audience_rating.desc": "audienceRating%3Adesc", "audience_rating.asc": "audienceRating", "audience_rating.desc": "audienceRating%3Adesc",
"user_rating.asc": "userRating", "user_rating.desc": "userRating%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", "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", "year.asc": "year", "year.desc": "year%3Adesc",
"originally_available.asc": "originallyAvailableAt", "originally_available.desc": "originallyAvailableAt%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", "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", "critic_rating.asc": "rating", "critic_rating.desc": "rating%3Adesc",
"audience_rating.asc": "audienceRating", "audience_rating.desc": "audienceRating%3Adesc", "audience_rating.asc": "audienceRating", "audience_rating.desc": "audienceRating%3Adesc",
"user_rating.asc": "userRating", "user_rating.desc": "userRating%3Adesc", "user_rating.asc": "userRating", "user_rating.desc": "userRating%3Adesc",

Loading…
Cancel
Save