[54] fix duplicate collection error

pull/1774/head
meisnate12 12 months ago
parent 481e76a61d
commit e81339d996

@ -1 +1 @@
1.19.1-develop53
1.19.1-develop54

@ -433,9 +433,9 @@ class IMDb:
for nom in cat["nominations"]:
if data["winning"] and not nom["isWinner"]:
continue
imdb_set = next(((n["const"], n["name"]) for n in nom["primaryNominees"] + nom["secondaryNominees"] if n["const"].startswith("tt")), None)
if imdb_set:
final_list.append(imdb_set)
imdb_id = next((n["const"] for n in nom["primaryNominees"] + nom["secondaryNominees"] if n["const"].startswith("tt")), None)
if imdb_id:
final_list.append(imdb_id)
break
return final_list
@ -519,10 +519,7 @@ class IMDb:
logger.info(f"Processing IMDb Award: {base_url}/{data['event_id']}/{data['event_year']}")
for k in ["award_filter", "category_filter", "winning"]:
logger.info(f" {k}: {data[k]}")
awards = self._award(data)
for award in awards:
logger.info(award)
return [(_i, "imdb") for _i, _ in awards]
return [(_i, "imdb") for _i in self._award(data)]
elif method == "imdb_search":
logger.info(f"Processing IMDb Search:")
for k, v in data.items():

@ -596,6 +596,7 @@ class MetadataFile(DataFile):
self.library = library
self.metadata = None
self.collections = None
self.dynamic_collections = []
self.templates = None
self.update_collections = True
self.update_seasons = True
@ -757,9 +758,11 @@ class MetadataFile(DataFile):
logger.separator(f"Loading {self.type_str} {file_type}: {path}")
logger.info("")
data = self.load_file(self.type, self.path)
if self.file_style == "metadata":
self.metadata = get_dict("metadata", data, library.metadatas)
self.templates = get_dict("templates", data)
self.external_templates(data)
if self.file_style == "collection":
self.collections = get_dict("collections", data, library.collections)
self.dynamic_collections = get_dict("dynamic_collections", data)
col_names = library.collections + [c for c in self.collections]

Loading…
Cancel
Save