runnerup icon indicating copy to clipboard operation
runnerup copied to clipboard

Digifit upload missing duration for manual activities

Open bagage opened this issue 10 years ago • 4 comments

While working on PR #249 , I am running into troubles with Digifit:

  • When uploading manual activity to the website, the duration is missing. Is it new? Does anyone use this website actually since it seems to be broken for a long time now?
  • ~~I tried to go in Settings -> accounts -> mydigifit -> clean uploaded workouts. Then I clicked upload button but workouts do not show up... so something must be broken in the database query right? I am not sure how it works @jonasoreland (or @paradix ?) so I did not gone any further but if you can fix this, would be great.~~ Fixed in 2c50560
  • ~~last I did not get how the sport was filled in file when uploading to digifit? It is working for running/biking but nothing explicit in code, so.. any clue?~~

bagage avatar May 01 '15 20:05 bagage

There is a bug in the AccountActivity class where the clearUploads method is being called. The Export table stores account_id not name and now the name is being used for the delete statement. So nothing gets deleted.

Replace with this line:

syncManager.clearUploads(callback, String.valueOf(syncManager.getSynchronizerByName(synchrnizer).getId()));

BTW you can rename synchrnizer to synchronizer :) It was my mistake.

paradix avatar May 01 '15 21:05 paradix

Thanks @paradix for the hint, it is working back :). Still have 2 points unsolved but I think @jonasoreland might know the answers when he's back.

bagage avatar May 03 '15 08:05 bagage

  1. re Digifit: I use digifit, and duration seems to work fine... except when doing uploading a "manual" event...in which case it seems like it's unset

can you confirm ?

  1. sport type: it's set in the TCX file. However that file-format only supports "running", "biking" and "other" (which is the reason why only these sports have been supported sofar). to fix it for other sports, one should set other, and then call another API to set correct sports type... i think something like that is done for MapMyRun...(i think)...

we should add code like that for many/most sites/syncrhronizers

/Jonas

On Sun, May 3, 2015 at 10:02 AM, Gautier Pelloux-Prayer < [email protected]> wrote:

Thanks @paradix https://github.com/paradix for the hint, it is working back :). Still have 2 points unsolved but I think @jonasoreland https://github.com/jonasoreland might know the answers when he's back.

— Reply to this email directly or view it on GitHub https://github.com/jonasoreland/runnerup/issues/250#issuecomment-98453140 .

jonasoreland avatar May 04 '15 11:05 jonasoreland

  1. yes I can confirm, I tested only for manual workout where duration is not set. Can you fix it?
  2. yes, I discovered that yesterday... I'm working on Garmin's case yet, as stated in PR #249. (will continue my comments on the PR now). Indeed we need a second call to the API to set the workout sport...

bagage avatar May 04 '15 20:05 bagage