jonasoreland / runnerup

A open source run tracker
GNU General Public License v3.0
730 stars 273 forks source link

Digifit upload missing duration for manual activities #250

Open bagage opened 9 years ago

bagage commented 9 years ago

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

paradix commented 9 years ago

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.

bagage commented 9 years ago

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.

jonasoreland commented 9 years ago

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 ?

2) 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 < notifications@github.com> 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 .

bagage commented 9 years ago

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...