Skip to content

Conversation

@beaufour
Copy link
Owner

Summary

  • Add fast local-first checking to skip already-downloaded photos without API calls
  • Add _check_file_exists_by_id() to check for existing files by photo ID pattern
  • Supports id, id_and_title, and title_and_id naming patterns
  • Check runs before any API calls are made

Problem

When resuming a large download (e.g., 17k+ photos), the current implementation makes API calls for each photo to determine if it needs to be downloaded. This can fail due to rate limits, preventing resumption.

Solution

Before making any API calls, check the local filesystem for files matching the photo ID pattern. This enables instant skipping of already-downloaded photos.

Test plan

  • Run existing test suite: uv run pytest -v
  • Manual test: Download partial set, interrupt, resume - should skip existing files instantly
  • Verify with 1000+ existing files that resume is fast

Closes #63

🤖 Generated with Claude Code

beaufour and others added 2 commits January 25, 2026 14:16
Add fast local-first checking to skip already-downloaded photos without
making any API calls:

- Add _check_file_exists_by_id() to check for existing files by photo ID
- Supports id, id_and_title, and title_and_id naming patterns
- Check runs before any API calls are made

This significantly speeds up resuming large downloads (17k+ photos) where
most files already exist locally.

Closes #63

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add tests for _check_file_exists_by_id() function
- Add test for local-first skip by ID pattern in do_download_photo

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

Cannot complete download of large photosets - checking existing files requires connection which can fail + slow

2 participants