Skip to content

Conversation

@tianheg
Copy link
Collaborator

@tianheg tianheg commented May 4, 2025

While I was figuring out how to generate my workouts page only with GPX files, I found the problem described in the title, so I fixed it :)

@vercel
Copy link

vercel bot commented May 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
running-page ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 4, 2025 3:57am

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the issue where GPX files were not properly syncing the track type, ensuring that if a GPX track includes a type, it is used correctly.

  • Added a check to determine if the GPX track has a "type" attribute and, if so, assigns it to the track instance
  • Ensures that only the run sport type is considered when syncing with GPX files
Comments suppressed due to low confidence (1)

run_page/gpxtrackposter/track.py:209

  • [nitpick] Using the attribute name 'type' may shadow the Python built-in and lead to confusion. Consider renaming it to a more descriptive name such as 'track_type'.
self.type = t.type

@tianheg tianheg requested a review from yihong0618 May 4, 2025 03:58
@yihong0618
Copy link
Owner

thanks

@yihong0618 yihong0618 merged commit 3071744 into yihong0618:master May 4, 2025
5 checks passed
@tianheg tianheg deleted the fix-gpx-sync branch May 4, 2025 04:22
@maslke
Copy link
Collaborator

maslke commented May 19, 2025

This change seems to have some issues. For Garmin GPX files, the type is "running", whereas many functionalities rely on the type being "Run".

if hasattr(t, "type") and t.type:
    self.type = t.type

@yihong0618
Copy link
Owner

This change seems to have some issues. For Garmin GPX files, the type is "running", whereas many functionalities rely on the type being "Run".

if hasattr(t, "type") and t.type:
    self.type = t.type

can you help to fix this?

@maslke
Copy link
Collaborator

maslke commented May 19, 2025

This change seems to have some issues. For Garmin GPX files, the type is "running", whereas many functionalities rely on the type being "Run".

if hasattr(t, "type") and t.type:
    self.type = t.type

can you help to fix this?

I will do it late.

1 similar comment
@maslke
Copy link
Collaborator

maslke commented May 19, 2025

This change seems to have some issues. For Garmin GPX files, the type is "running", whereas many functionalities rely on the type being "Run".

if hasattr(t, "type") and t.type:
    self.type = t.type

can you help to fix this?

I will do it late.

@maslke
Copy link
Collaborator

maslke commented May 19, 2025

the pr is #852.
Please take a look when it's convenient for you.

tiny656 pushed a commit to tiny656/running_page that referenced this pull request Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants