#308 Custom sorting

This commit is contained in:
meisnate12 2021-07-29 17:36:26 -04:00
parent a4409f7f17
commit b6005b0f03
3 changed files with 17 additions and 11 deletions

View file

@ -124,16 +124,16 @@ show_only_filters = ["network"]
smart_invalid = ["collection_order"]
smart_url_invalid = ["filters", "run_again", "sync_mode", "show_filtered", "show_missing", "save_missing", "smart_label"] + radarr_details + sonarr_details
custom_sort_builders = [
#"tmdb_collection", "tmdb_list", "tmdb_popular", "tmdb_now_playing", "tmdb_top_rated",
#"tmdb_trending_daily", "tmdb_trending_weekly", "tmdb_discover",
#"tvdb_list",
"imdb_list", "tmdb_list"
#"trakt_list", "trakt_trending", "trakt_popular", "trakt_recommended", "trakt_watched", "trakt_collected",
#"tautulli_popular", "tautulli_watched", "letterboxd_list", "icheckmovies_list",
#"anidb_popular",
#"anilist_top_rated", "anilist_popular", "anilist_season", "anilist_studio", "anilist_genre", "anilist_tag",
#"mal_all", "mal_airing", "mal_upcoming", "mal_tv", "mal_movie", "mal_ova", "mal_special",
#"mal_popular", "mal_favorite", "mal_suggested", "mal_userlist", "mal_season"
"tmdb_list", "tmdb_popular", "tmdb_now_playing", "tmdb_top_rated",
"tmdb_trending_daily", "tmdb_trending_weekly", "tmdb_discover",
"tvdb_list",
"imdb_list",
"trakt_list", "trakt_trending", "trakt_popular", "trakt_recommended", "trakt_watched", "trakt_collected",
"tautulli_popular", "tautulli_watched", "letterboxd_list", "icheckmovies_list",
"anidb_popular",
"anilist_top_rated", "anilist_popular", "anilist_season", "anilist_studio", "anilist_genre", "anilist_tag",
"mal_all", "mal_airing", "mal_upcoming", "mal_tv", "mal_movie", "mal_ova", "mal_special",
"mal_popular", "mal_favorite", "mal_suggested", "mal_userlist", "mal_season"
]
class CollectionBuilder:

View file

@ -423,6 +423,8 @@ class Plex:
if self.config.Cache:
_, _, image_overlay = self.config.Cache.query_image_map(item.ratingKey, self.image_table_name)
if poster_uploaded or not image_overlay or image_overlay != overlay_name:
if not item.posterUrl:
raise Failed(f"Overlay Error: No existing poster to Overlay for {item.title}")
response = requests.get(item.posterUrl)
if response.status_code >= 400:
raise Failed(f"Overlay Error: Overlay Failed for {item.title}")

View file

@ -12,6 +12,10 @@ builders = [
"trakt_collected", "trakt_collection", "trakt_list", "trakt_list_details", "trakt_popular",
"trakt_recommended", "trakt_trending", "trakt_watched", "trakt_watchlist"
]
sorts = [
"rank", "added", "title", "released", "runtime", "popularity",
"percentage", "votes", "random", "my_rating", "watched", "collected"
]
class Trakt:
def __init__(self, config, params):
@ -140,7 +144,7 @@ class Trakt:
else: return [], [item["show"]["ids"]["tvdb"] for item in items]
def validate_trakt(self, trakt_lists, is_movie, trakt_type="list"):
values = util.get_list(trakt_lists)
values = util.get_list(trakt_lists, split=False)
trakt_values = []
for value in values:
try: