Complete Phase 9: Final validation for identifier standardization
- Fix search API key extraction from link slugs - All 1006 tests pass - All 19 performance tests pass - Manual end-to-end testing verified - Key lookup performance: O(1) ~0.11μs per lookup Phase 9 tasks completed: - Task 9.1: Full test suite validation - Task 9.2: Manual end-to-end testing - Task 9.3: Performance testing All identifier standardization phases (1-9) now complete.
This commit is contained in:
@@ -529,8 +529,12 @@ async def _perform_search(
|
||||
)
|
||||
|
||||
# If key is empty, try to extract from link
|
||||
if not key and link and "/anime/stream/" in link:
|
||||
key = link.split("/anime/stream/")[-1].split("/")[0]
|
||||
if not key and link:
|
||||
if "/anime/stream/" in link:
|
||||
key = link.split("/anime/stream/")[-1].split("/")[0]
|
||||
elif link and "/" not in link:
|
||||
# Link is just a slug (e.g., "attack-on-titan")
|
||||
key = link
|
||||
else:
|
||||
# Extract key (primary identifier)
|
||||
key = getattr(match, "key", "") or getattr(match, "id", "")
|
||||
@@ -545,8 +549,12 @@ async def _perform_search(
|
||||
missing = getattr(match, "missing_episodes", {})
|
||||
|
||||
# If key is empty, try to extract from link
|
||||
if not key and link and "/anime/stream/" in link:
|
||||
key = link.split("/anime/stream/")[-1].split("/")[0]
|
||||
if not key and link:
|
||||
if "/anime/stream/" in link:
|
||||
key = link.split("/anime/stream/")[-1].split("/")[0]
|
||||
elif link and "/" not in link:
|
||||
# Link is just a slug (e.g., "attack-on-titan")
|
||||
key = link
|
||||
|
||||
summaries.append(
|
||||
AnimeSummary(
|
||||
|
||||
Reference in New Issue
Block a user