[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

@ -92,7 +92,7 @@ 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; |
@ -101,6 +101,7 @@ There are a couple other attributes you can have at the top level only along wit
| `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; |
| `episode_release.asc`<br>`episode_release.desc` | Sort by Episode Release Date (Originally Available) | &#10060; | &#9989; | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; |
| `critic_rating.asc`<br>`critic_rating.desc` | Sort by Critic Rating | &#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; |
| `audience_rating.asc`<br>`audience_rating.desc` | Sort by Audience Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `audience_rating.asc`<br>`audience_rating.desc` | Sort by Audience Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `user_rating.asc`<br>`user_rating.desc` | Sort by User Rating | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | | `user_rating.asc`<br>`user_rating.desc` | Sort by User Rating | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; |

@ -61,7 +61,7 @@ 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; |
@ -70,6 +70,7 @@ There are a couple other attributes you can have at the top level only along wit
| `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; |
| `episode_release.asc`<br>`episode_release.desc` | Sort by Episode Release Date (Originally Available) | &#10060; | &#9989; | &#9989; | &#9989; | &#10060; | &#10060; | &#10060; |
| `critic_rating.asc`<br>`critic_rating.desc` | Sort by Critic Rating | &#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; |
| `audience_rating.asc`<br>`audience_rating.desc` | Sort by Audience Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; | | `audience_rating.asc`<br>`audience_rating.desc` | Sort by Audience Rating | &#9989; | &#9989; | &#10060; | &#9989; | &#10060; | &#10060; | &#10060; |
| `user_rating.asc`<br>`user_rating.desc` | Sort by User Rating | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | | `user_rating.asc`<br>`user_rating.desc` | Sort by User Rating | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; | &#9989; |

@ -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