Skip to content

Implement ASSET_MAPPINGS for centralized asset type management #2

@sandlbn

Description

@sandlbn

The asset type determination logic is scattered across different functions in src/manifest/utils.rs with hardcoded switch statements. This should be refactored to use a centralized mapping system.

Asset type determination is done through separate functions with hardcoded logic:

  • determine_model_type()
  • determine_format()
  • determine_software_type()
  • determine_dataset_type()

Proposed Solution

  • Populate ASSET_MAPPINGS with file extension to AssetInfo mappings, similar to c2pa lib
  • Create get_asset_info() to use case-insensitive lookups
  • Refactor the existing determine_* functions to use the centralized mapping
  • Remove duplicate/scattered asset type logic

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions