diff --git a/rowers/templates/export.html b/rowers/templates/export.html index d207cf0b..1ddf4c33 100644 --- a/rowers/templates/export.html +++ b/rowers/templates/export.html @@ -162,6 +162,9 @@

connect with Under Armour

+
+

connect with TrainingPeaks

+
diff --git a/rowers/tpstuff.py b/rowers/tpstuff.py index 7146a109..0b7cacf1 100644 --- a/rowers/tpstuff.py +++ b/rowers/tpstuff.py @@ -208,7 +208,8 @@ def tp_check(access_token): return resp -def uploadactivity(access_token,filename,description=''): +def uploadactivity(access_token,filename,description='', + name='Rowsandall.com workout'): data_gz = BytesIO() with file(filename,'rb') as inF: s = inF.read() @@ -226,6 +227,8 @@ def uploadactivity(access_token,filename,description=''): "UploadClient": "rowsandall", "Filename": filename, "SetWorkoutPublic": True, + "Title":name, + "Type": "rowing", "Comment": description, "Data": base64.b64encode(data_gz.getvalue()).decode("ascii") } diff --git a/rowers/views.py b/rowers/views.py index 9877f00d..a1dea47a 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -1230,7 +1230,7 @@ def workout_tp_upload_view(request,id=0): tcxfile = tpstuff.createtpworkoutdata(w) if tcxfile: res = tpstuff.uploadactivity(r.tptoken,tcxfile, - description=w.notes) + name=w.name) if res == 0: message = "Upload to TrainingPeaks failed" w.uploadedtotp = -1 diff --git a/static/img/TP_logo_horz_2_color.png b/static/img/TP_logo_horz_2_color.png new file mode 100644 index 00000000..dc6838eb Binary files /dev/null and b/static/img/TP_logo_horz_2_color.png differ