Skip to content

Commit

Permalink
Provide another way to upload all kinds of sport type of TCX file to …
Browse files Browse the repository at this point in the history
…Strava.
  • Loading branch information
Vensent committed Apr 28, 2024
1 parent c91c325 commit 2a2a414
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion run_page/oppo_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def get_all_oppo_tracks(
)
tracks.append(track)
except Exception as e:
print(f"Something wrong paring keep id {str(start)}-{str(end)}" + str(e))
print(f"Something wrong paring keep id {str(start)}-{str(end)}, " + str(e))
return tracks


Expand Down Expand Up @@ -408,6 +408,10 @@ def prepare_track_points(sport_data, with_gpx):

for i in range(value_size):
temp_timestamp = other_data.get("gpsPoint")[i]["timestamp"]

if temp_timestamp not in timestamp_list:
continue

j = timestamp_list.index(temp_timestamp)

points_dict = {
Expand Down
2 changes: 1 addition & 1 deletion run_page/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_strava_last_time(client, is_milliseconds=True):
return 0


def upload_file_to_strava(client, file_name, data_type, force_to_run=True):
def upload_file_to_strava(client, file_name, data_type, force_to_run=False):
with open(file_name, "rb") as f:
try:
if force_to_run:
Expand Down

0 comments on commit 2a2a414

Please sign in to comment.