updates:?
Local Docker Build (Dev) / build-dev (push) Successful in 4s

This commit is contained in:
2025-10-18 14:12:51 -04:00
parent e06df9c8b0
commit 3b32f7e023
2 changed files with 24 additions and 12 deletions
+1 -1
View File
@@ -1 +1 @@
2.4.0
2.4.1
+23 -11
View File
@@ -375,16 +375,16 @@ async def get_missing_dates_report(dependencies: dict):
episodes_with_dates = db._get_first_value(cursor.fetchone())
else:
cursor.execute("SELECT COUNT(*) FROM movies WHERE dateadded IS NOT NULL AND dateadded != ''")
movies_with_dates = cursor.fetchone()[0]
movies_with_dates = db._get_first_value(cursor.fetchone())
cursor.execute("SELECT COUNT(*) FROM movies")
total_movies = cursor.fetchone()[0]
total_movies = db._get_first_value(cursor.fetchone())
cursor.execute("SELECT COUNT(*) FROM episodes WHERE dateadded IS NOT NULL AND dateadded != ''")
episodes_with_dates = cursor.fetchone()[0]
episodes_with_dates = db._get_first_value(cursor.fetchone())
cursor.execute("SELECT COUNT(*) FROM episodes")
total_episodes = cursor.fetchone()[0]
total_episodes = db._get_first_value(cursor.fetchone())
return {
"summary": {
@@ -443,11 +443,17 @@ async def get_dashboard_stats(dependencies: dict):
episodes_no_valid_source = db._get_first_value(cursor.fetchone())
# Recent activity (last 7 days)
cursor.execute("""
SELECT COUNT(*) FROM processing_history
WHERE processed_at > datetime('now', '-7 days')
""")
recent_activity = cursor.fetchone()[0]
if db.db_type == "postgresql":
cursor.execute("""
SELECT COUNT(*) FROM processing_history
WHERE processed_at > NOW() - INTERVAL '7 days'
""")
else:
cursor.execute("""
SELECT COUNT(*) FROM processing_history
WHERE processed_at > datetime('now', '-7 days')
""")
recent_activity = db._get_first_value(cursor.fetchone())
# Source distribution for movies
cursor.execute("""
@@ -457,7 +463,10 @@ async def get_dashboard_stats(dependencies: dict):
GROUP BY source
ORDER BY count DESC
""")
movie_sources = [{"source": row[0], "count": row[1]} for row in cursor.fetchall()]
if db.db_type == "postgresql":
movie_sources = [{"source": list(row.values())[0], "count": list(row.values())[1]} for row in cursor.fetchall()]
else:
movie_sources = [{"source": row[0], "count": row[1]} for row in cursor.fetchall()]
# Source distribution for episodes
cursor.execute("""
@@ -467,7 +476,10 @@ async def get_dashboard_stats(dependencies: dict):
GROUP BY source
ORDER BY count DESC
""")
episode_sources = [{"source": row[0], "count": row[1]} for row in cursor.fetchall()]
if db.db_type == "postgresql":
episode_sources = [{"source": list(row.values())[0], "count": list(row.values())[1]} for row in cursor.fetchall()]
else:
episode_sources = [{"source": row[0], "count": row[1]} for row in cursor.fetchall()]
# Calculate total missing dates (movies + episodes)
total_missing_dates = movies_without_dates + episodes_without_dates