nfo: improvments
This commit is contained in:
+30
-4
@@ -2725,17 +2725,43 @@ def register_routes(app, dependencies: dict):
|
||||
print(f" Episodes: {episodes_with_dates}/{total_episodes} found in DB, {episodes_missing_db} missing from DB")
|
||||
print(f" Movies: {movies_with_dates}/{total_movies} found in DB, {movies_missing_db} missing from DB")
|
||||
|
||||
total_missing = len(missing_items["episodes"]) + len(missing_items["movies"])
|
||||
print(f"✅ NFO repair scan complete: {total_missing} items missing dateadded elements")
|
||||
# Calculate comprehensive statistics
|
||||
total_nfo_files_missing = len(missing_tv_nfo_files) + len(missing_movie_nfo_files)
|
||||
total_with_imdb_and_db = len(missing_items["episodes"]) + len(missing_items["movies"])
|
||||
|
||||
print(f"✅ NFO repair scan complete:")
|
||||
print(f" 📄 {total_nfo_files_missing} NFO files missing dateadded elements")
|
||||
print(f" 🎬 {len(missing_tv_nfo_files)} TV episodes, {len(missing_movie_nfo_files)} movies")
|
||||
print(f" 🔍 {total_with_imdb_and_db} items with IMDb IDs found in database (can be fixed)")
|
||||
|
||||
return {
|
||||
"status": "success",
|
||||
"total_missing": total_missing,
|
||||
"total_missing": total_with_imdb_and_db, # Items that can be fixed
|
||||
"total_nfo_files_missing": total_nfo_files_missing, # All NFO files missing dateadded
|
||||
"episodes_missing": len(missing_items["episodes"]),
|
||||
"movies_missing": len(missing_items["movies"]),
|
||||
"tv_nfo_files_missing": len(missing_tv_nfo_files),
|
||||
"movie_nfo_files_missing": len(missing_movie_nfo_files),
|
||||
"total_tv_files_checked": total_tv_files_checked,
|
||||
"total_movie_files_checked": total_movie_files_checked,
|
||||
"missing_items": missing_items
|
||||
"missing_items": missing_items,
|
||||
"statistics": {
|
||||
"nfo_files_scanned": {
|
||||
"tv": total_tv_files_checked,
|
||||
"movies": total_movie_files_checked,
|
||||
"total": total_tv_files_checked + total_movie_files_checked
|
||||
},
|
||||
"nfo_files_missing_dateadded": {
|
||||
"tv": len(missing_tv_nfo_files),
|
||||
"movies": len(missing_movie_nfo_files),
|
||||
"total": total_nfo_files_missing
|
||||
},
|
||||
"items_with_imdb_and_database": {
|
||||
"tv": len(missing_items["episodes"]),
|
||||
"movies": len(missing_items["movies"]),
|
||||
"total": total_with_imdb_and_db
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user