Skip to content

Commit

Permalink
bug timschneeb#15 - fix case for fully interactive mode (no parameter…
Browse files Browse the repository at this point in the history
…s specified)
  • Loading branch information
marcin-gryszkalis committed Jul 8, 2024
1 parent f3206d9 commit 39ff934
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions komootgpx/komootgpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def make_gpx(tour_id, api, output_dir, no_poi, skip_existing, tour_base, add_dat
# :10 extracts "2022-01-02" from this.
date_str = tour_base['date'][:10]+'_' if add_date else ''

path = f"{output_dir}/{date_str}{sanitize_filename(tour['name'])}-{tour_id}.gpx"
path = f"{output_dir}/{date_str}{sanitize_filename(tour_base['name'])}-{tour_id}.gpx"

if skip_existing and os.path.exists(path):
print_success(f"{tour_base['name']} skipped - already exists at '{path}'")
Expand Down Expand Up @@ -171,7 +171,7 @@ def main(argv):
make_gpx(tour_selection, api, output_dir, no_poi, False, None, add_date)
else:
if int(tour_selection) in tours:
make_gpx(tour_selection, api, output_dir, no_poi, skip_existing, tours[tour_selection], add_date)
make_gpx(tour_selection, api, output_dir, no_poi, skip_existing, tours[int(tour_selection)], add_date)
else:
make_gpx(tour_selection, api, output_dir, no_poi, skip_existing, None, add_date)
print()
Expand Down

0 comments on commit 39ff934

Please sign in to comment.