openambitproject / openambit

openambit
280 stars 82 forks source link

Add functionality for resyncing moves deleted on movescount.com #75

Closed gelim closed 7 years ago

gelim commented 9 years ago

Hi,

I've synced some runs from to movescount, then I deleted by hand some runs in the web interface. If I try to manually resync those moves from the app ("write to movescount file") I got the following console error :

Failed to upload log, movescount.com replied with " ""Move already exists (UserDeviceID: XXXXXX, StartTime_LT: 11\/2\/2014 5:24:22 PM, move.Duration.TotalSeconds: 3109.4)"" "

If I list the moves from their REST API I got 0 moves.

curl -XGET http://uiservices.movescount.com/moves/private?appkey={APPKEY}&userkey={USERKEY}&email={EMAIL}
[]

I'm not sure if the problem is from their REST API, or the app not doing the proper things. Cheers,

marguslt commented 9 years ago

It's Movescount "issue" , delete keeps at least Move's meta data, most likely whole Move, and just hides it from users. You can still resync deleted move - change start time manually in Moves's xml (just adding a second will do), restart openambit and try writing to Movescount. Not sure at the moment if you have to change start time only in summary and/or for first track point as well, can't check right now.

svenstorp commented 9 years ago

Closing since it is not a openambit issue, and @marguslt did provide a workaround.

marguslt commented 9 years ago

I personally wouldn't mind if 'Write Movescount file' would check movescount reponse and if needed, asks if I want to re-sync :) Just for reference, it's enough to change Duration, Suunto support have been giving basically same advice for people who want to re-sync deleted moves with Moveslink2.

~/.openambit$ diff log_*_2014_11_06_18_20_18.log log_*_2014_11_06_18_20_19.log 
6c6
<     <MovescountId>44859256</MovescountId>
---
>     <MovescountId>44787479</MovescountId>
63c63
<             <Duration>2094700</Duration>
---
>             <Duration>2094701</Duration>

No need to change MovescountId yourself. Result, original Move not yet deleted: image

gelim commented 9 years ago

thanks @marguslt for the tip !

svenstorp commented 9 years ago

@marguslt: That is absolutely a reasonable feature, I'm adding it as a new feature issue!

svenstorp commented 9 years ago

Well, I rather change subject reopen this one :)

landas commented 7 years ago

Closing issue without any recent activity. Feel free to reopen if issue is still relevant.