dev #62
+48
-48
@@ -1556,55 +1556,55 @@ async def get_episodes_missing_nfo_dateadded(dependencies: dict):
|
||||
async with session.get(core_url) as response:
|
||||
if response.status == 200:
|
||||
result = await response.json()
|
||||
print(f"✅ Core container scan complete: {result['total_missing']} items missing dateadded")
|
||||
|
||||
# Transform the data to match the expected legacy format
|
||||
episodes_missing = result['missing_items']['episodes']
|
||||
movies_missing = result['missing_items']['movies']
|
||||
|
||||
# Combine for legacy items format
|
||||
all_missing = []
|
||||
for episode in episodes_missing:
|
||||
all_missing.append({
|
||||
"imdb_id": episode["imdb_id"],
|
||||
"season": episode["season"],
|
||||
"episode": episode["episode"],
|
||||
"series_name": episode["series_name"],
|
||||
"episode_name": episode["episode_name"],
|
||||
"dateadded": episode["dateadded"],
|
||||
"nfo_path": episode["nfo_path"],
|
||||
"media_type": "episode",
|
||||
"nfo_exists": True,
|
||||
"dateadded_in_nfo": False,
|
||||
"should_have_date": True
|
||||
})
|
||||
|
||||
for movie in movies_missing:
|
||||
all_missing.append({
|
||||
"imdb_id": movie["imdb_id"],
|
||||
"title": movie["title"],
|
||||
"dateadded": movie["dateadded"],
|
||||
"nfo_path": movie["nfo_path"],
|
||||
"media_type": "movie",
|
||||
"nfo_exists": True,
|
||||
"dateadded_in_nfo": False,
|
||||
"should_have_date": True
|
||||
})
|
||||
|
||||
return {
|
||||
"success": True,
|
||||
"total_episodes_checked": len(episodes_missing), # Close enough for UI
|
||||
"total_movies_checked": len(movies_missing),
|
||||
"total_items_checked": result['total_missing'],
|
||||
"missing_dateadded_count": result['total_missing'],
|
||||
"items": all_missing[:50], # Limit display to first 50
|
||||
"debug_info": {
|
||||
"scan_method": "core_container_filesystem",
|
||||
"core_container_response": "success",
|
||||
"episodes_missing": result['episodes_missing'],
|
||||
"movies_missing": result['movies_missing']
|
||||
print(f"✅ Core container scan complete: {result['total_missing']} items missing dateadded")
|
||||
|
||||
# Transform the data to match the expected legacy format
|
||||
episodes_missing = result['missing_items']['episodes']
|
||||
movies_missing = result['missing_items']['movies']
|
||||
|
||||
# Combine for legacy items format
|
||||
all_missing = []
|
||||
for episode in episodes_missing:
|
||||
all_missing.append({
|
||||
"imdb_id": episode["imdb_id"],
|
||||
"season": episode["season"],
|
||||
"episode": episode["episode"],
|
||||
"series_name": episode["series_name"],
|
||||
"episode_name": episode["episode_name"],
|
||||
"dateadded": episode["dateadded"],
|
||||
"nfo_path": episode["nfo_path"],
|
||||
"media_type": "episode",
|
||||
"nfo_exists": True,
|
||||
"dateadded_in_nfo": False,
|
||||
"should_have_date": True
|
||||
})
|
||||
|
||||
for movie in movies_missing:
|
||||
all_missing.append({
|
||||
"imdb_id": movie["imdb_id"],
|
||||
"title": movie["title"],
|
||||
"dateadded": movie["dateadded"],
|
||||
"nfo_path": movie["nfo_path"],
|
||||
"media_type": "movie",
|
||||
"nfo_exists": True,
|
||||
"dateadded_in_nfo": False,
|
||||
"should_have_date": True
|
||||
})
|
||||
|
||||
return {
|
||||
"success": True,
|
||||
"total_episodes_checked": len(episodes_missing), # Close enough for UI
|
||||
"total_movies_checked": len(movies_missing),
|
||||
"total_items_checked": result['total_missing'],
|
||||
"missing_dateadded_count": result['total_missing'],
|
||||
"items": all_missing[:50], # Limit display to first 50
|
||||
"debug_info": {
|
||||
"scan_method": "core_container_filesystem",
|
||||
"core_container_response": "success",
|
||||
"episodes_missing": result['episodes_missing'],
|
||||
"movies_missing": result['movies_missing']
|
||||
}
|
||||
}
|
||||
}
|
||||
else:
|
||||
error_text = await response.text()
|
||||
print(f"❌ Core container scan failed: {response.status} - {error_text}")
|
||||
|
||||
Reference in New Issue
Block a user