Only the latest activity is imported from Garmin Connect to Dropbox on the same day
See original GitHub issueOnly the latest activity is imported from Garmin Connect to Dropbox when having multiple same category activities on the same day.
Example:
I had two cycling activities on July 4th, one in the morning and the other in the evening. Only the evening’s activity was imported to Dropbox (2017-07-04_Pikkala Cycling_Cycling.tcx
)
The issue appeared few weeks ago and probably is caused by this commit
dbcl.files_upload(data.encode("UTF-8"), fpath, mode=dropbox.files.WriteMode.overwrite)
dropbox.files.WriteMode.overwrite
mode is used for uploading activity files and that seems to be the root cause.
Better and backwards compatible solution for uploading files would be to use dropbox.files.WriteMode.add
mode with autorename=True
option. files_upload function code
With those options, it would generate files like it used to do before the API upgrade commit:
2017-06-19_Pikkala Cycling_Cycling.tcx
2017-06-19_Pikkala Cycling_Cycling (1).tcx
2017-06-19_Pikkala Cycling_Cycling (2).tcx
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:8 (2 by maintainers)
Top GitHub Comments
In the linked issue #369 I wrote a short workaround: Press “reconfigure” in dropbox tab then “setup” and change file format to something like this (include hours and minutes):
I will see if I can create a pull request later this week to update the default filename settings to this instead.
@c5ef2 Do you think this change would be good enough?
@christofferholmstedt The fix looks good. Both of my today’s cycling workouts were synced correctly after I had changed my Dropbox configuration as you suggested.