Show exercise count in stats

This commit is contained in:
Peter Stockings
2025-01-26 20:31:39 +11:00
parent df3796b30e
commit dc543c7b75

View File

@@ -124,11 +124,14 @@ def get_stats_from_topsets(topsets):
for t in topsets if t['WorkoutId'] is not None]))
people_count = len(set([t['PersonId']
for t in topsets if t['PersonId'] is not None]))
exercise_count = len(set([t['ExerciseId']
for t in topsets if t['ExerciseId'] is not None]))
workout_start_dates = [t['StartDate']
for t in topsets if t['StartDate'] is not None]
stats = [{"Text": "Total Workouts", "Value": workout_count},
{"Text": "Total Sets", "Value": len(topsets)}]
{"Text": "Total Sets", "Value": len(topsets)},
{"Text": "Total Exercises", "Value": exercise_count}]
if people_count > 1:
stats.append({"Text": "People tracked", "Value": people_count})
if workout_count > 0: