fix: prevent --only-print-filenames from downloading during live phot… #1220#1238
Merged
AndreyNikiforov merged 2 commits intoicloud-photos-downloader:masterfrom Aug 31, 2025
Conversation
…o deduplication Fixes issue icloud-photos-downloader#1220 where --only-print-filenames would still download live photo video files during deduplication. The bug occurred because the deduplication logic would change the filename and reset file_exists to False, causing the download to proceed despite only_print_filenames=True. Changes: - Restructured live photo handling logic in download_builder() - Added proper only_print_filenames check during deduplication - Ensures deduplicated filenames are printed without triggering downloads - Added comprehensive test case to prevent regression 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix test failure on Windows platform by using os.path.join()
instead of hardcoded forward slashes for path construction.
This ensures the test works correctly on both Unix and Windows systems.
Windows was returning: ['2018\\07\\31\\IMG_7409.MOV']
Test expected: ['2018/07/31\\IMG_7409.MOV']
Fixed to use: os.path.join("2018", "07", "31", "IMG_7409.MOV")
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
df2ba11
into
icloud-photos-downloader:master
28 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…o deduplication
Fixes issue #1220 where --only-print-filenames would still download live photo video files during deduplication. The bug occurred because the deduplication logic would change the filename and reset file_exists to False, causing the download to proceed despite only_print_filenames=True.
Changes:
🤖 Generated with Claude Code