integration icon indicating copy to clipboard operation
integration copied to clipboard

Implement asset selection logic for download counting

Open ludeeus opened this issue 6 months ago • 0 comments

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_asset method to intelligently select the correct asset based on filename, plugin patterns, manifest filename, or fallback to the first asset.
  • Updated common_update_data method to use _find_target_asset for determining the download count.

fixes #4438

ludeeus avatar Jul 06 '25 19:07 ludeeus