Fix issue #926 keyerror adjusted alternative#1235
Merged
AndreyNikiforov merged 2 commits intoicloud-photos-downloader:masterfrom Aug 30, 2025
Merged
Conversation
Move filename calculation logic from PhotoAsset.versions property into separate reusable function and remove filename property from AssetVersion class. Key changes: - Add calculate_asset_version_filename() function in asset_version.py - Remove filename parameter from AssetVersion constructor - Add filename_override property for disambiguation purposes - Add calculate_version_filename() method to PhotoAsset class - Update disambiguate_filenames() to accept PhotoAsset parameter - Fix circular import by moving add_suffix_to_filename helper - Update all filename property access points throughout codebase - Add py.typed markers for strict mypy compliance - Update tests to use new AssetVersion constructor signature This refactoring separates concerns, improves code reusability, and maintains full backward compatibility while passing all tests and strict mypy checks. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add test cases that validate fix for KeyError when downloading photos with --size adjusted --size alternative options (issue icloud-photos-downloader#926) - Update test expectations to match corrected behavior after refactoring - Fix AssetVersion constructor calls in remaining test cases - Update CHANGELOG.md to document the bug fix Tests now properly validate that missing adjusted/alternative versions fall back to original version without throwing KeyError exceptions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
5bd53a0
into
icloud-photos-downloader:master
398 checks passed
rhoopr
referenced
this pull request
in rhoopr/kei
Feb 8, 2026
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.
No description provided.