Skip to content

Commit

Permalink
Merge pull request #293 from soutade/strava_uploader_fix
Browse files Browse the repository at this point in the history
Thanks for the PR, I am not using these watches any more, so can't verify the changes, but they look good as far as I can tell.
  • Loading branch information
centic9 authored Sep 14, 2023
2 parents a3ebe71 + 3c185ef commit ca910d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/strava_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ else
OPENAMBIT_CLI=openambit-cli
fi

$OPENAMBIT_CLI --no-sync-sport-mode --no-sync-navigation $@ || exit 1
$OPENAMBIT_CLI --no-sync-sport-mode --no-sync-navigation --no-sync-orbit $@ || exit 1

# Get new number of logs
nb_new_logs=`ls -l ~/.openambit/*.log|wc -l`
Expand Down
4 changes: 4 additions & 0 deletions tools/stravauploader/strava_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ def uploadMove(activity):
r = requests.get(activty_url, headers=headers)
resp = r.json()

if resp.get('error', ''):
print(resp['error'])
return (r.status_code, resp['error'])

if r.status_code == 200:
print('New activity at https://www.strava.com/activities/{}'.format(resp['activity_id']))
return (r.status_code, 'OK')
Expand Down

0 comments on commit ca910d1

Please sign in to comment.