fix: metadata enrichment fails silently — use 'or {}' for None metadata
.get('metadata', {}) returns None when key exists with None value,
causing 'NoneType has no attribute copy' in MetadataEnricher.
Enrichment now works: 17/20 anime + 15/28 series results show synopsis.
This commit is contained in:
@@ -170,8 +170,8 @@ async def search_anime_unified(
|
||||
if len(results[pid]) <= 15:
|
||||
enrichment_tasks.append(
|
||||
enricher.enrich_metadata(
|
||||
item_dict.get("metadata", {}),
|
||||
item_dict.get("title", ""),
|
||||
item_dict.get("metadata") or {},
|
||||
item_dict.get("title") or "",
|
||||
url,
|
||||
)
|
||||
)
|
||||
@@ -277,9 +277,9 @@ async def search_series_unified(
|
||||
if isinstance(item, dict):
|
||||
enrichment_tasks.append(
|
||||
enricher.enrich_metadata(
|
||||
item.get("metadata", {}),
|
||||
item.get("title", ""),
|
||||
item.get("url", ""),
|
||||
item.get("metadata") or {},
|
||||
item.get("title") or "",
|
||||
item.get("url") or "",
|
||||
)
|
||||
)
|
||||
enrichment_mapping.append((provider_id, idx))
|
||||
|
||||
Reference in New Issue
Block a user