temp logging
This commit is contained in:
@@ -128,7 +128,7 @@ class IntervalsIntegration(SyncIntegration):
|
||||
except TypeError:
|
||||
newnotes = 'from'+w.workoutsource+' via rowsandall.com'
|
||||
|
||||
row.exporttotcx(tcxfilename, notes=newnotes)
|
||||
row.exporttotcx(tcxfilename, notes=newnotes, sport=mytypes.intervalsmapping[w.workouttype])
|
||||
if dozip:
|
||||
gzfilename = tcxfilename + '.gz'
|
||||
try:
|
||||
@@ -181,6 +181,7 @@ class IntervalsIntegration(SyncIntegration):
|
||||
# set workout type to workouttype
|
||||
url = "https://intervals.icu/api/v1/activity/{activityid}".format(activityid=id)
|
||||
|
||||
|
||||
thetype = mytypes.intervalsmapping[workout.workouttype]
|
||||
response = requests.put(url, headers=headers, json={'type': thetype})
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class TPIntegration(SyncIntegration):
|
||||
except TypeError:
|
||||
newnotes = 'from '+w.workoutsource+' via rowsandall.com'
|
||||
|
||||
row.exporttotcx(tcxfilename, notes=newnotes)
|
||||
row.exporttotcx(tcxfilename, notes=newnotes, sport=tpmapping(w.workouttype))
|
||||
|
||||
return tcxfilename
|
||||
|
||||
|
||||
@@ -181,7 +181,40 @@ fitcollection = (
|
||||
|
||||
fitmapping = {key: value for key, value in Reverse(fitcollection)}
|
||||
|
||||
tcxcollection = (
|
||||
('water', 'Rowing'),
|
||||
('rower', 'Rowing'),
|
||||
('skierg', 'CrossCountrySkiing'),
|
||||
('bike', 'Biking'),
|
||||
('bikeerg', 'Biking'),
|
||||
('dynamic', 'Rowing'),
|
||||
('slides', 'Rowing'),
|
||||
('paddle', 'Other'),
|
||||
('snow', 'CrossCountrySkiing'),
|
||||
('coastal', 'Rowing'),
|
||||
('c-boat', 'Rowing'),
|
||||
('churchboat', 'Rowing'),
|
||||
('Ride', 'Biking'),
|
||||
('Run', 'Running'),
|
||||
('NordicSki', 'CrossCountrySkiing'),
|
||||
('Swim', 'Swimming'),
|
||||
('Hike', 'Hiking'),
|
||||
('Walk', 'Walking'),
|
||||
('Canoeing', 'Other'),
|
||||
('Crossfit', 'Other'),
|
||||
('StandUpPaddling', 'Other'),
|
||||
('IceSkate', 'Other'),
|
||||
('WeightTraining', 'Other'),
|
||||
('InlineSkate', 'Other'),
|
||||
('Kayaking', 'Other'),
|
||||
('Workout', 'Other'),
|
||||
('Yoga', 'Other'),
|
||||
('other', 'Other'),
|
||||
)
|
||||
|
||||
tcxmapping = {key: value for key, value in Reverse(tcxcollection)}
|
||||
|
||||
tcxmappinginv = {value: key for key, value in Reverse(tcxcollection) if value is not None}
|
||||
|
||||
intervalscollection = (
|
||||
('water', 'Rowing'),
|
||||
|
||||
@@ -4971,6 +4971,8 @@ def workout_upload_api(request):
|
||||
message = {'status': 'false', 'message': 'could not find file'}
|
||||
return JSONResponse(status=400, data=message)
|
||||
|
||||
dologging('own_api.log','-temp-')
|
||||
dologging('own_api.log',post_data)
|
||||
|
||||
# sync related IDs
|
||||
sporttracksid = post_data.get('sporttracksid','')
|
||||
|
||||
Reference in New Issue
Block a user