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>