diff --git a/CHANGELOG b/CHANGELOG index 9a178190..af8e977c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -36,5 +36,6 @@ Fixes sort order of resolution collections Fixes #2228 ".any" not accepted for a variety of imdb_search parameters Fixes `streaming` defaults adding and removing items randomly Fixes missing TMDb Discover parameters +Fixes `imdb_chart` error when using `trending_india` Adds error information to help with #2201 Various other Minor Fixes diff --git a/VERSION b/VERSION index f5809525..6782cde5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.2-build51 +2.0.2-build52 diff --git a/defaults/both/streaming.yml b/defaults/both/streaming.yml index 502c34cb..dd6041f2 100644 --- a/defaults/both/streaming.yml +++ b/defaults/both/streaming.yml @@ -20,9 +20,11 @@ templates: conditionals: discover_sort: conditions: - - library_type: movie + - originals_only: false + library_type: movie value: primary_release_date.desc - - library_type: show + - originals_only: false + library_type: show value: first_air_date.desc originals: conditions: @@ -42,6 +44,14 @@ templates: conditions: - originals_only: false value: <> + discover_limit: + conditions: + - originals_only: false + value: 0 + discover_count: + conditions: + - originals_only: false + value: 100 allowed_streaming: conditions: - originals_only: true @@ -74,13 +84,12 @@ templates: mdblist_list: https://mdblist.com/lists/k0meta/<>-<> limit: <> tmdb_discover: - limit: 0 + limit: <> with_watch_providers: <> - vote_count.gte: 100 + vote_count.gte: <> watch_region: <> sort_by: <> - collections: Streaming Collections: template: diff --git a/defaults/overlays/streaming.yml b/defaults/overlays/streaming.yml index 6f3a6536..44bb1a68 100644 --- a/defaults/overlays/streaming.yml +++ b/defaults/overlays/streaming.yml @@ -66,9 +66,11 @@ templates: conditionals: discover_sort: conditions: - - library_type: movie + - originals_only: false + library_type: movie value: primary_release_date.desc - - library_type: show + - originals_only: false + library_type: show value: first_air_date.desc originals: conditions: @@ -77,7 +79,11 @@ templates: discover_limit: conditions: - originals_only: false - value: <> + value: 0 + discover_count: + conditions: + - originals_only: false + value: 100 discover_with: conditions: - originals_only: false @@ -110,7 +116,7 @@ templates: tmdb_discover: limit: <> with_watch_providers: <> - vote_count.gte: 100 + vote_count.gte: <> watch_region: <> sort_by: <> diff --git a/modules/builder.py b/modules/builder.py index a4ea7b68..e9ae880a 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -1483,14 +1483,10 @@ class CollectionBuilder: self.builders.append((method_name, imdb_dict)) elif method_name == "imdb_chart": for value in util.get_list(method_data): - if value in imdb.movie_charts and not self.library.is_movie: - raise Failed(f"{self.Type} Error: chart: {value} does not work with show libraries") - elif value in imdb.show_charts and self.library.is_movie: - raise Failed(f"{self.Type} Error: chart: {value} does not work with movie libraries") - elif value in imdb.movie_charts or value in imdb.show_charts: - self.builders.append((method_name, value)) - else: - raise Failed(f"{self.Type} Error: chart: {value} is invalid options are {[i for i in imdb.charts]}") + _chart = imdb.movie_charts if self.library.is_movie else imdb.show_charts + if value not in _chart: + raise Failed(f"{self.Type} Error: chart: {value} is invalid options are {', '.join(_chart)}") + self.builders.append((method_name, value)) elif method_name == "imdb_award": for dict_data in util.parse(self.Type, method_name, method_data, datatype="listdict"): dict_methods = {dm.lower(): dm for dm in dict_data} @@ -2010,7 +2006,7 @@ class CollectionBuilder: raise Failed(f"{self.Type} Error: {method_name} {discover_method} attribute: must be used with either with_watch_providers, without_watch_providers, or with_watch_monetization_types") elif discover_attr == "with_watch_monetization_types": if "watch_region" in dict_data: - new_dictionary[lower_method] = util.parse(self.Type, discover_method, discover_data, parent=method_name, options=tmdb.discover_monetization_types) + new_dictionary[lower_method] = discover_data else: raise Failed(f"{self.Type} Error: {method_name} {discover_method} attribute: must be used with watch_region") elif discover_attr in tmdb.discover_booleans: diff --git a/modules/tmdb.py b/modules/tmdb.py index c108e04b..fe924a87 100644 --- a/modules/tmdb.py +++ b/modules/tmdb.py @@ -35,8 +35,9 @@ discover_tv_only = [ ] discover_strings = [ "with_cast", "with_crew", "with_people", "with_companies", "without_companies", "with_networks", "with_genres", - "without_genres", "with_release_type", "with_keywords", "without_keywords", "with_origin_country", "with_original_language", "timezone", - "with_watch_providers", "without_watch_providers", "with_overview_translation", "with_title_translation", "with_name_translation" + "without_genres", "with_release_type", "with_keywords", "without_keywords", "with_origin_country", "timezone", + "with_watch_providers", "without_watch_providers", "with_overview_translation", + "with_original_language", "with_watch_monetization_types", "with_title_translation", "with_name_translation" ] discover_ints = ["vote_count", "with_runtime"] modifiers = [".gte", ".lte"]