Files
wanderer/db
Stefan Schlögl 19fd259129 fix komoot sync stopping before all tours are imported (#917)
Three bugs caused partial imports:

1. Type filter halted pagination: if a page contained only tours of the
   excluded type (planned vs. recorded), syncTrailWithTours returned false
   and the loop stopped even though later pages might have matching tours.
   Fixed by tracking allAlreadySynced separately - only tours already in the
   DB count toward early termination, not type-filtered ones.

2. continue on error never incremented page: a fetch or sync error called
   continue on the outer for loop, so page stayed the same and hasNewTours
   was never updated, causing an infinite retry on the failing page. Changed
   to break so a failed page aborts the current sync cycle cleanly.

3. Pagination ignored TotalPages: the loop used a fragile stop heuristic
   instead of the TotalPages value returned by the Komoot API. fetchTours
   now returns TotalPages and the loop uses it as the upper bound, with the
   allAlreadySynced early-exit kept as an optimization for incremental syncs.

Closes #570

Co-authored-by: slothful-vassal <89943360+slothful-vassal@users.noreply.github.com>
2026-04-20 20:24:51 +02:00
..
2025-09-13 13:27:23 +02:00
2025-06-27 11:51:23 +02:00
2026-03-07 10:00:31 +01:00
2026-01-24 22:21:19 +01:00
2025-03-17 14:57:52 +01:00
2026-03-01 19:35:13 +01:00
2026-04-18 11:59:32 +02:00
2026-04-18 11:59:32 +02:00
2026-03-20 13:58:34 +01:00
2025-01-24 17:46:13 +01:00