Skip to content

Commit

Permalink
fix: subtype issue
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <[email protected]>
  • Loading branch information
yihong0618 committed Nov 25, 2024
1 parent fb4290a commit b921d94
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions run_page/codoon_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ def parse_raw_data_to_namedtuple(
"id": log_id,
"name": str(cast_type) + " from codoon",
"type": cast_type,
"subtype": cast_type,
"start_date": datetime.strftime(start_date, "%Y-%m-%d %H:%M:%S"),
"end": datetime.strftime(end_date, "%Y-%m-%d %H:%M:%S"),
"start_date_local": datetime.strftime(start_date, "%Y-%m-%d %H:%M:%S"),
Expand Down
1 change: 1 addition & 0 deletions run_page/endomondo_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def parse_run_endomondo_to_nametuple(en_dict):
"id": en_dict.get("id"),
"name": "run from endomondo",
"type": "Run", # TODO others
"subtype": "Run", # TODO others
"start_date": datetime.strftime(start_date, "%Y-%m-%d %H:%M:%S"),
"end": datetime.strftime(end_date, "%Y-%m-%d %H:%M:%S"),
"start_date_local": datetime.strftime(start_date_local, "%Y-%m-%d %H:%M:%S"),
Expand Down
1 change: 1 addition & 0 deletions run_page/joyrun_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ def parse_raw_data_to_nametuple(self, run_data, old_gpx_ids, with_gpx=False):
"name": "run from joyrun",
# future to support others workout now only for run
"type": "Run",
"subtype": "Run",
"start_date": datetime.strftime(start_date, "%Y-%m-%d %H:%M:%S"),
"end": datetime.strftime(end, "%Y-%m-%d %H:%M:%S"),
"start_date_local": datetime.strftime(
Expand Down
1 change: 1 addition & 0 deletions run_page/keep_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def parse_raw_data_to_nametuple(
"name": f"{KEEP2STRAVA[run_data['dataType']]} from keep",
# future to support others workout now only for run
"type": f"{KEEP2STRAVA[(run_data['dataType'])]}",
"subtype": f"{KEEP2STRAVA[(run_data['dataType'])]}",
"start_date": datetime.strftime(start_date, "%Y-%m-%d %H:%M:%S"),
"end": datetime.strftime(end, "%Y-%m-%d %H:%M:%S"),
"start_date_local": datetime.strftime(start_date_local, "%Y-%m-%d %H:%M:%S"),
Expand Down
1 change: 1 addition & 0 deletions run_page/nike_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def parse_no_gpx_data(activity):
"id": int(nike_id),
"name": "run from nike",
"type": "Run",
"subtype": "Run",
"start_date": datetime.strftime(start_date, "%Y-%m-%d %H:%M:%S"),
"end": datetime.strftime(end_date, "%Y-%m-%d %H:%M:%S"),
"start_date_local": datetime.strftime(start_date_local, "%Y-%m-%d %H:%M:%S"),
Expand Down
1 change: 1 addition & 0 deletions run_page/oppo_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def parse_raw_data_to_name_tuple(sport_data, with_gpx, with_tcx):
"name": "activity from oppo",
# future to support others workout now only for run
"type": map_oppo_fit_type_to_strava_activity_type(sport_data["sportMode"]),
"subtype": map_oppo_fit_type_to_strava_activity_type(sport_data["sportMode"]),
"start_date": datetime.strftime(start_date, "%Y-%m-%d %H:%M:%S"),
"end": datetime.strftime(end, "%Y-%m-%d %H:%M:%S"),
"start_date_local": datetime.strftime(start_date_local, "%Y-%m-%d %H:%M:%S"),
Expand Down
1 change: 1 addition & 0 deletions run_page/tulipsport_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def get_all_activity_summaries(session, headers, start_time=None):
"moving_time": moving_time,
"elapsed_time": moving_time,
"type": "Run",
"subtype": "Run",
"start_date": start_date,
"start_date_local": start_date_local,
"end_date": start_date + moving_time,
Expand Down

0 comments on commit b921d94

Please sign in to comment.