Skip to content

[Feature]: Read and write an arbitrary field on any tag #112

Closed

Description

@decriptor

Problem Statement

TagLib# 2.3 can get, set, and remove an arbitrary field on a concrete tag (GetField, SetField, RemoveField), including several values for one key. TagLibSharp2 can store an arbitrary key on some formats, and each format has its own method. A caller that does not know the container cannot round-trip a custom field.

What already exists:

  • Vorbis comments: GetValue, GetValues, SetValue
  • APE: GetValue, SetValue, and binary items
  • ID3v2: TXXX through SetUserTextFrame and UserTextFrames
  • RIFF INFO: GetField and SetField for a four-character code
  • MP4: GetFreeformTag and SetFreeformTag

ASF and Matroska expose the mapped Tag properties. An unmapped name on those tags is dropped.

Proposed Solution

Add one API on Tag that reads, writes, and removes a named field, with multiple values where the format allows them. Each format stores the field in its native place: a Vorbis comment, an APE item, a TXXX frame, an MP4 freeform atom, an ASF attribute, a Matroska SimpleTag, or a RIFF INFO chunk. A format that cannot store an arbitrary key leaves the value unset and reports that.

The mapped properties (Title, Artist, and the rest) stay as they are. This API is for names those properties do not cover.

Alternatives Considered

Documenting the per-format methods and stopping there. That keeps every caller casting to the concrete tag.

Additional Context

Compared against the custom-tag example in the TagLib# 2.3 README.

Activity

  1. added
    enhancement
    on Nov 17, 2026
  2. added 2 commits that reference this issue on Nov 22, 2026
    55a0466
    f5a53b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions