Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On V2 branch, workouts with identical names end up over-writing each other and not getting uploaded to Garmin #106

Closed
jsmrcina opened this issue May 4, 2021 · 5 comments
Assignees
Labels

Comments

@jsmrcina
Copy link

jsmrcina commented May 4, 2021

I tried to sync my entire Peloton history to my Garmin account. Workouts contain a timestamp for length and this mostly makes them unique when they are being written to file. For example:

33_min_26_sec_Just_Ride_with_JUST_RIDE.fit

I noticed that some of my arm workouts on the same workout video are missing. My theory is that because the names are exactly identical, only one got uploaded from the whole set. This is corroborated by the fact that enabling backup only generates a single .fit file for this workout, even though there are several that should have been created:

10_min_Arms_&_Shoulders_Strength_with_Ben_Alldis.fit

I can see that the downloader is pulling multiple workouts, but my guess is the uploader only ends up only getting one due to the naming collision:

2021-05-03 20:30:14.894 -07:00 [INF] Encoded FIT file C:\P2G\working\10_min_Arms_&_Shoulders_Strength_with_Ben_Alldis.fit
2021-05-03 20:30:14.898 -07:00 [INF] Backed up file ./output\fit\10_min_Arms_&_Shoulders_Strength_with_Ben_Alldis.fit
2021-05-03 20:30:14.938 -07:00 [INF] Encoded FIT file C:\P2G\working\10_min_Arms_&_Shoulders_Strength_with_Ben_Alldis.fit
2021-05-03 20:30:14.942 -07:00 [INF] Backed up file ./output\fit\10_min_Arms_&_Shoulders_Strength_with_Ben_Alldis.fit

Proposal would be to add some unique hash or other identifier (date/time) to these to avoid collisions.

@jsmrcina
Copy link
Author

jsmrcina commented May 4, 2021

I can work around this by deleting a single entry (which is missing from Garmin) from the workouts that have identical names from the sync history and then re-running the sync tool. This way, I can get them to upload one at a time.

@philosowaffle
Copy link
Owner

@jsmrcina quick update on this. I've got the fix locally but am blocked verifying it until #109 is resolved. 🤞 will have it merged this week.

@philosowaffle
Copy link
Owner

A fix for this has been pushed tot he V2 branch that ensures we always have unique file names. Unfortunately, still blocked by #109 in terms of fully testing it, but I do think the core problem is resolved.

@jsmrcina
Copy link
Author

@philosowaffle Thanks for the heads up -- I've been hitting the auth issue as well but hadn't had time to investigate whether it was my fault or not. Glad to see it's being looked into already. Once that is resolved, I'm happy to test this with real world data as I have a few workouts that fit this pattern. Appreciate the update, cheers.

@philosowaffle
Copy link
Owner

@jsmrcina There is a new fix for the authentication issues that has been working for me.

#109 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants