Skip to content

Fix TCX export for non-GPS activities (#1337) - #1379

Open
roberi wants to merge 1 commit into
jonasoreland:masterfrom
roberi:fix/i1337-non-gps-tcx-export
Open

Fix TCX export for non-GPS activities (#1337)#1379
roberi wants to merge 1 commit into
jonasoreland:masterfrom
roberi:fix/i1337-non-gps-tcx-export

Conversation

@roberi

@roberi roberi commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1337

Non-GPS activities, such as Gym workouts, could be exported without lap data, resulting in incomplete TCX files that Strava rejected for missing activity time information.

In TCX.exportLaps(), the call to ExportOptions.shouldExportLap() passed lap time and distance values in the wrong order. As a result, laps from activities with a duration but no distance were incorrectly filtered out during export.

After swapping the time and distance arguments in the shouldExportLap() call, Gym and other non-GPS activities can now be successfully uploaded to Strava.

Note! There is still a separate issue related to how Strava interprets non-GPS activities when GPS-related fields are present in the exported TCX file, but this is outside the scope of this PR.

Correct parameter mapping when calling shouldExportLap(). Swapped lap time and distance arguments caused laps with duration but no distance to be excluded from TCX exports.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes TCX lap-export filtering for non-GPS activities by passing lap distance/time to ExportOptions.shouldExportLap() in the correct order, ensuring laps with duration but no distance are not incorrectly omitted (which caused Strava to reject the TCX due to missing time information).

Changes:

  • Corrected the argument order (distance vs time) in TCX.exportLaps() when calling ExportOptions.shouldExportLap().

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@gerhardol gerhardol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

have not run

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.

Upload of Gym Activity without GPS to Strava never works

3 participants