checks for item without year it it fails to find with year

pull/707/head
meisnate12 3 years ago
parent 910738549a
commit e0eec35387

@ -1 +1 @@
1.15.1-develop52 1.15.1-develop53

@ -528,15 +528,14 @@ class MetadataFile(DataFile):
item = self.library.search_item(title, year=year) item = self.library.search_item(title, year=year)
if item is None:
item = self.library.search_item(f"{title} (SUB)", year=year)
if item is None and "alt_title" in methods: if item is None and "alt_title" in methods:
if meta[methods["alt_title"]] is None: if meta[methods["alt_title"]] is None:
logger.error("Metadata Error: alt_title attribute is blank") logger.error("Metadata Error: alt_title attribute is blank")
else: else:
alt_title = meta["alt_title"] alt_title = meta["alt_title"]
item = self.library.search_item(alt_title, year=year) item = self.library.search_item(alt_title, year=year)
if item is None:
item = self.library.search_item(alt_title)
if item is None: if item is None:
logger.error(f"Plex Error: Item {mapping_name} not found") logger.error(f"Plex Error: Item {mapping_name} not found")

Loading…
Cancel
Save