[63] small fixes

pull/1793/head
meisnate12 11 months ago
parent c8910efc7d
commit 1e47bdd278

@ -1 +1 @@
1.19.1-develop62
1.19.1-develop63

@ -1486,8 +1486,11 @@ class CollectionBuilder:
raise Failed(f"{self.Type} Error: imdb_id {value} must begin with tt")
elif method_name == "imdb_list":
logger.warning(f"{self.Type} Warning: imdb_list has been deprecated, and at some point may no longer work. Please switch to using imdb_search.")
for imdb_dict in self.config.IMDb.validate_imdb_lists(self.Type, method_data, self.language):
self.builders.append((method_name, imdb_dict))
try:
for imdb_dict in self.config.IMDb.validate_imdb_lists(self.Type, method_data, self.language):
self.builders.append((method_name, imdb_dict))
except Failed as e:
logger.error(e)
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:

@ -863,7 +863,7 @@ class ConfigFile:
elif old_value == new_value:
logger.warning(f"Config Warning: {op} value '{new_value}' ignored as it cannot be mapped to itself")
else:
params[op][old_value] = new_value if new_value else None
params[op][str(old_value)] = str(new_value) if new_value else None
if op == "delete_collections":
params[op] = {
"managed": check_for_attribute(input_dict, "managed", var_type="bool", default_is_none=True, save=False),

@ -20,10 +20,11 @@ charts = {
}
imdb_search_attributes = [
"limit", "sort_by", "title", "type", "type.not", "release.after", "release.before", "rating.gte", "rating.lte",
"votes.gte", "votes.lte", "genre", "genre.any", "genre.not", "event", "event.winning", "series", "series.not",
"imdb_top", "imdb_bottom", "company", "content_rating", "country", "country.any", "country.not", "country.origin",
"keyword", "keyword.any", "keyword.not", "language", "language.any", "language.not", "language.primary",
"popularity.gte", "popularity.lte", "cast", "cast.any", "cast.not", "runtime.gte", "runtime.lte", "adult",
"votes.gte", "votes.lte", "genre", "genre.any", "genre.not", "event", "event.winning", "imdb_top", "imdb_bottom",
"company", "content_rating", "country", "country.any", "country.not", "country.origin", "keyword", "keyword.any",
"keyword.not", "series", "series.not", "list", "list.any", "list.not", "language", "language.any", "language.not",
"language.primary", "popularity.gte", "popularity.lte", "cast", "cast.any", "cast.not", "runtime.gte",
"runtime.lte", "adult",
]
sort_by_options = {
"popularity": "POPULARITY",
@ -108,6 +109,8 @@ class IMDb:
raise Failed(f"{err_type} Error: imdb_list url attribute is blank")
else:
imdb_url = imdb_dict[dict_methods["url"]].strip()
if imdb_url.startswith("https://www.imdb.com/search/title/"):
raise Failed("IMDb Error: IMDb URLs with https://www.imdb.com/search/title/ no longer work with imdb_list.")
if not imdb_url.startswith(tuple([v for k, v in urls.items()])):
fails = "\n ".join([f"{v} (For {k.replace('_', ' ').title()})" for k, v in urls.items()])
raise Failed(f"IMDb Error: {imdb_url} must begin with either:\n {fails}")

Loading…
Cancel
Save