Skip to content

Allow to distinguish between "complete replace", "replace keys", and "add"  #5

@supermihi

Description

@supermihi

setProperties() in its current implementation replaces the complete metadata (except for unsupported objects) wtih those in the argument map. I propose the following extension, either by additional methods or a second "mode" argument to setProperties:

  • replace keys: only replace tags whose keys appear in the given PropertyMap; replace their current values by those in the argument map, don't touch keys present in the file but not in the argument. Problem: Deleting a key. PropertyMap regards keys with empty value list as not present, so deleting by providing a key with empty value list is not an option.
  • append: this would correspond to replacing with the argument merged with properties(), i.e. concatenating value lists of each key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions