web: more debugsy
Local Docker Build (Dev) / build-dev (push) Successful in 5s

This commit is contained in:
2025-10-26 12:35:03 -04:00
parent f38ca539d6
commit eba70ec045
+48 -48
View File
@@ -1556,55 +1556,55 @@ async def get_episodes_missing_nfo_dateadded(dependencies: dict):
async with session.get(core_url) as response: async with session.get(core_url) as response:
if response.status == 200: if response.status == 200:
result = await response.json() result = await response.json()
print(f"✅ Core container scan complete: {result['total_missing']} items missing dateadded") print(f"✅ Core container scan complete: {result['total_missing']} items missing dateadded")
# Transform the data to match the expected legacy format # Transform the data to match the expected legacy format
episodes_missing = result['missing_items']['episodes'] episodes_missing = result['missing_items']['episodes']
movies_missing = result['missing_items']['movies'] movies_missing = result['missing_items']['movies']
# Combine for legacy items format # Combine for legacy items format
all_missing = [] all_missing = []
for episode in episodes_missing: for episode in episodes_missing:
all_missing.append({ all_missing.append({
"imdb_id": episode["imdb_id"], "imdb_id": episode["imdb_id"],
"season": episode["season"], "season": episode["season"],
"episode": episode["episode"], "episode": episode["episode"],
"series_name": episode["series_name"], "series_name": episode["series_name"],
"episode_name": episode["episode_name"], "episode_name": episode["episode_name"],
"dateadded": episode["dateadded"], "dateadded": episode["dateadded"],
"nfo_path": episode["nfo_path"], "nfo_path": episode["nfo_path"],
"media_type": "episode", "media_type": "episode",
"nfo_exists": True, "nfo_exists": True,
"dateadded_in_nfo": False, "dateadded_in_nfo": False,
"should_have_date": True "should_have_date": True
}) })
for movie in movies_missing: for movie in movies_missing:
all_missing.append({ all_missing.append({
"imdb_id": movie["imdb_id"], "imdb_id": movie["imdb_id"],
"title": movie["title"], "title": movie["title"],
"dateadded": movie["dateadded"], "dateadded": movie["dateadded"],
"nfo_path": movie["nfo_path"], "nfo_path": movie["nfo_path"],
"media_type": "movie", "media_type": "movie",
"nfo_exists": True, "nfo_exists": True,
"dateadded_in_nfo": False, "dateadded_in_nfo": False,
"should_have_date": True "should_have_date": True
}) })
return { return {
"success": True, "success": True,
"total_episodes_checked": len(episodes_missing), # Close enough for UI "total_episodes_checked": len(episodes_missing), # Close enough for UI
"total_movies_checked": len(movies_missing), "total_movies_checked": len(movies_missing),
"total_items_checked": result['total_missing'], "total_items_checked": result['total_missing'],
"missing_dateadded_count": result['total_missing'], "missing_dateadded_count": result['total_missing'],
"items": all_missing[:50], # Limit display to first 50 "items": all_missing[:50], # Limit display to first 50
"debug_info": { "debug_info": {
"scan_method": "core_container_filesystem", "scan_method": "core_container_filesystem",
"core_container_response": "success", "core_container_response": "success",
"episodes_missing": result['episodes_missing'], "episodes_missing": result['episodes_missing'],
"movies_missing": result['movies_missing'] "movies_missing": result['movies_missing']
}
} }
}
else: else:
error_text = await response.text() error_text = await response.text()
print(f"❌ Core container scan failed: {response.status} - {error_text}") print(f"❌ Core container scan failed: {response.status} - {error_text}")