[52] Fix `originals_only` on Streaming (#2244)

pull/2245/head
YozoraXCII 2 months ago committed by GitHub Action
parent 15c7357d32
commit 3a473796b0

@ -36,5 +36,6 @@ Fixes sort order of resolution collections
Fixes #2228 ".any" not accepted for a variety of imdb_search parameters Fixes #2228 ".any" not accepted for a variety of imdb_search parameters
Fixes `streaming` defaults adding and removing items randomly Fixes `streaming` defaults adding and removing items randomly
Fixes missing TMDb Discover parameters Fixes missing TMDb Discover parameters
Fixes `imdb_chart` error when using `trending_india`
Adds error information to help with #2201 Adds error information to help with #2201
Various other Minor Fixes Various other Minor Fixes

@ -1 +1 @@
2.0.2-build51 2.0.2-build52

@ -20,9 +20,11 @@ templates:
conditionals: conditionals:
discover_sort: discover_sort:
conditions: conditions:
- library_type: movie - originals_only: false
library_type: movie
value: primary_release_date.desc value: primary_release_date.desc
- library_type: show - originals_only: false
library_type: show
value: first_air_date.desc value: first_air_date.desc
originals: originals:
conditions: conditions:
@ -42,6 +44,14 @@ templates:
conditions: conditions:
- originals_only: false - originals_only: false
value: <<final_tmdb_key>> value: <<final_tmdb_key>>
discover_limit:
conditions:
- originals_only: false
value: 0
discover_count:
conditions:
- originals_only: false
value: 100
allowed_streaming: allowed_streaming:
conditions: conditions:
- originals_only: true - originals_only: true
@ -74,13 +84,12 @@ templates:
mdblist_list: https://mdblist.com/lists/k0meta/<<key>>-<<originals>> mdblist_list: https://mdblist.com/lists/k0meta/<<key>>-<<originals>>
limit: <<limit>> limit: <<limit>>
tmdb_discover: tmdb_discover:
limit: 0 limit: <<discover_limit>>
with_watch_providers: <<discover_with>> with_watch_providers: <<discover_with>>
vote_count.gte: 100 vote_count.gte: <<discover_count>>
watch_region: <<discover_region>> watch_region: <<discover_region>>
sort_by: <<discover_sort>> sort_by: <<discover_sort>>
collections: collections:
Streaming Collections: Streaming Collections:
template: template:

@ -66,9 +66,11 @@ templates:
conditionals: conditionals:
discover_sort: discover_sort:
conditions: conditions:
- library_type: movie - originals_only: false
library_type: movie
value: primary_release_date.desc value: primary_release_date.desc
- library_type: show - originals_only: false
library_type: show
value: first_air_date.desc value: first_air_date.desc
originals: originals:
conditions: conditions:
@ -77,7 +79,11 @@ templates:
discover_limit: discover_limit:
conditions: conditions:
- originals_only: false - originals_only: false
value: <<limit>> value: 0
discover_count:
conditions:
- originals_only: false
value: 100
discover_with: discover_with:
conditions: conditions:
- originals_only: false - originals_only: false
@ -110,7 +116,7 @@ templates:
tmdb_discover: tmdb_discover:
limit: <<discover_limit>> limit: <<discover_limit>>
with_watch_providers: <<discover_with>> with_watch_providers: <<discover_with>>
vote_count.gte: 100 vote_count.gte: <<discover_count>>
watch_region: <<discover_region>> watch_region: <<discover_region>>
sort_by: <<discover_sort>> sort_by: <<discover_sort>>

@ -1483,14 +1483,10 @@ class CollectionBuilder:
self.builders.append((method_name, imdb_dict)) self.builders.append((method_name, imdb_dict))
elif method_name == "imdb_chart": elif method_name == "imdb_chart":
for value in util.get_list(method_data): for value in util.get_list(method_data):
if value in imdb.movie_charts and not self.library.is_movie: _chart = imdb.movie_charts if self.library.is_movie else imdb.show_charts
raise Failed(f"{self.Type} Error: chart: {value} does not work with show libraries") if value not in _chart:
elif value in imdb.show_charts and self.library.is_movie: raise Failed(f"{self.Type} Error: chart: {value} is invalid options are {', '.join(_chart)}")
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)) 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]}")
elif method_name == "imdb_award": elif method_name == "imdb_award":
for dict_data in util.parse(self.Type, method_name, method_data, datatype="listdict"): for dict_data in util.parse(self.Type, method_name, method_data, datatype="listdict"):
dict_methods = {dm.lower(): dm for dm in dict_data} 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") 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": elif discover_attr == "with_watch_monetization_types":
if "watch_region" in dict_data: 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: else:
raise Failed(f"{self.Type} Error: {method_name} {discover_method} attribute: must be used with watch_region") raise Failed(f"{self.Type} Error: {method_name} {discover_method} attribute: must be used with watch_region")
elif discover_attr in tmdb.discover_booleans: elif discover_attr in tmdb.discover_booleans:

@ -35,8 +35,9 @@ discover_tv_only = [
] ]
discover_strings = [ discover_strings = [
"with_cast", "with_crew", "with_people", "with_companies", "without_companies", "with_networks", "with_genres", "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", "without_genres", "with_release_type", "with_keywords", "without_keywords", "with_origin_country", "timezone",
"with_watch_providers", "without_watch_providers", "with_overview_translation", "with_title_translation", "with_name_translation" "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"] discover_ints = ["vote_count", "with_runtime"]
modifiers = [".gte", ".lte"] modifiers = [".gte", ".lte"]

Loading…
Cancel
Save