integration
integration copied to clipboard
Implement asset selection logic for download counting
This pull request introduces enhancements to the asset selection logic for download counting in the hacs repository, along with comprehensive test coverage for various scenarios. The most notable changes include the addition of a helper method to identify the correct asset for download, updates to the download counting logic, and new test cases to ensure robustness.
Asset Selection Enhancements:
custom_components/hacs/repositories/base.py: Added_find_target_assetmethod to intelligently select the correct asset based on filename, plugin patterns, manifest filename, or fallback to the first asset.- Updated
common_update_datamethod to use_find_target_assetfor determining the download count.
fixes #4438