aboutsummaryrefslogtreecommitdiff
path: root/web/server.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-08-21 06:56:12 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-08-21 06:56:12 +0200
commit9da52d7355f5a77f0adc9a658619b3bfef03ba3c (patch)
treeb9e5f803d0c9787a84696b9e38b06b6721c9ded3 /web/server.go
parent13aeedfbb9271444ca42efb45bbe0986ae7610ce (diff)
feat(ride): persist canonical moving time, preserve Strava reference
Diffstat (limited to 'web/server.go')
-rw-r--r--web/server.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/server.go b/web/server.go
index 4bc74e3..06ee425 100644
--- a/web/server.go
+++ b/web/server.go
@@ -228,7 +228,7 @@ func buildRideViews(items []rides.Ride) []RideView {
}
func buildRideView(item rides.Ride) RideView {
- view := RideView{Ride: item, Cotacol: "-", CotacolPer100Km: "-"}
+ view := RideView{Ride: item, Cotacol: "-", CotacolPer100Km: "-", MovingTime: formatDuration(item.EffectiveMovingTimeS())}
cotacol, ready := item.CotacolScore()
if ready && item.CotacolAlgorithmVersion() == ride.CotacolAlgorithmVersion && item.DistanceM > 0 {
view.Cotacol = formatCotacol(cotacol)
@@ -459,7 +459,7 @@ func rideFromActivity(externalID, gpxPath string, activity strava.Activity) ride
Type: activityType,
StartDate: activity.StartDate,
DistanceM: activity.DistanceM,
- MovingTimeS: activity.MovingTimeS,
+ ExternalMovingTimeS: activity.MovingTimeS,
ElapsedTimeS: activity.ElapsedTimeS,
TotalElevationGainM: activity.TotalElevationGainM,
AverageSpeedMps: activity.AverageSpeedMps,