Closed pygoubet closed 3 years ago
@pygoubet - Can you test out the latest release to see if this works properly again?
Thanks!
@Raistlfiren thanks for the feature
It seems it remains a little something to fix...
./bin/console garmin:workout tests/Resource/multi-events-day.csv schedule --start 2021-05-17 --no-interaction -x
All defined workouts are created: OK
Creating workouts
-----------------
* Workout - 10x30''30'' was created on the Garmin website with the id 341278695
* Workout - easy cycle was created on the Garmin website with the id 341278697
* Workout - easy run was created on the Garmin website with the id 341278698
* Workout - long run was created on the Garmin website with the id 341278699
But the 3rd workout of planned on Monday is not scheduled:
Scheduling workouts
-------------------
* Workout - 10x30''30'' with id 341278695 was scheduled on the Garmin website for 2021-05-17
* Workout - easy cycle with id 341278697 was scheduled on the Garmin website for 2021-05-17
* Workout - long run with id 341278699 was scheduled on the Garmin website for 2021-05-19
I can reproduce the problem with a CSV file of my own. The last workout of a day with several multiple workouts is not scheduled.
It seems to be related to a variable passed by reference issue. Below a quick (and dirty?) workaround. File: src/Library/Parser/Parser.php
if ($workout->getName() === $this->parseWorkoutName($workoutName)) {
Thanks @pygoubet - Commenting out those lines will cause problems. I just pushed a fix that should address your problem. Please test it again and see if there are any issues now.
@Raistlfiren thank you for the fix. It works fine.
Hi, The feature introduced in PR #6 has stopped working. Could you consider re-adding the ability to encode several workouts on the same day?