isoteemu/sports-tracker-liberator

Track Points duplicating for Different Sports

Opened this issue · 0 comments

On 11/28/2016 I recorded only a cycling workout, and on 11/29 I recorded only a weight lifting workout.

The following code gives me all the tracks points for 11/28 as expected (only Cycling).

On 11/29, I am getting the expected points for "Weight lifting", but then also getting all duplicated points of this 11/29 weight lifting workout, but with the sport showing "Cycling", which never occurred on 11/29.

workouts = endomondo.get_workouts()

for workout in workouts:
    workoutId = workout.id
    workoutDetails = endomondo.get_workout(workout)      
    sport = sports[workoutDetails.sport]
    workoutPoints=workoutDetails.points
    for point in workoutPoints:
        print point.time.date(), point.time, sport, point.hr