Skip to content

2.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Oct 23:32
· 1 commit to main since this release

Full Changelog: 1.16.2...2.0.0

spfk-metadata 2.0.0

2.0 makes saving metadata safe by default: a save writes only what changed, keeps what other apps
stored, never moves a WAV's audio, and reports exactly which parts it could not write. Released
together with spfk-metadata-base 2.0.0 (re-exported) and spfk-metadata-xmp 2.0.0.

Your data survives a save

  • Other apps' metadata is kept: ID3 descriptions and languages, comments in several languages,
    multi-valued tags, iTunes item names, WAV INFO and unknown chunks, cue notes (note/ltxt),
    and iXML and BEXT bytes exactly as stored.
  • Unedited artwork is written back byte-for-byte; an MP3 keeps its ID3 version and gains no ID3v1 tag.
  • A component that could not be read (tags, markers, artwork, BEXT, iXML) is never written back as
    empty. The parse records it in readStatus, and a save refuses that part.
  • Ogg and FLAC point chapters stay points; an overlong AIFF marker name is trimmed, not stored as "?".
  • MP4 files no longer show an untitled first chapter.

Saving

  • Every format saves in one write: MP3, FLAC, Ogg, MP4, AIFF, Matroska and WAV.
  • WAV and AIFF saves never move the audio. When another format's audio has to move, the whole file
    is written to a sibling and swapped in, so an interrupted save cannot leave it half written.
  • A save writes only the components whose dirty flag is set and whose content changed.

Partial saves and errors

  • New MetadataError.incompleteSave(written:failures:): a save that wrote some parts lists the
    MetadataComponents it wrote and every part it left out (not read, not written, or unstorable).
    A bare error now always means nothing was written.
  • New saveFailed(URL) and openFailed(URL). UnstorableMetadataError is folded in as
    MetadataError.unstorable.
  • The Finder tags and modification date always follow a container write.

Performance

  • A WAV is parsed in one open instead of two, its length read from fmt /data.
  • The parse no longer makes an artwork thumbnail; call ArtworkDescription.createThumbnail() where
    it is shown. Parse with a 4.8 MB cover: 17.3 → 3.0 ms.
  • WAV saves that move audio are several times faster.

Breaking changes

  • MetadataComponent (new, top level) replaces MetadataError.Component; the XMP case is .xmp.
  • MetadataDirtyFlag.metadata → .tags and .image → .artwork. Stored raw values are unchanged.
  • ImageDescription → ArtworkDescription; the imageDescription property → artwork (coding key unchanged).
  • UnstorableMetadataError removed (use MetadataError.unstorable).
  • EmbeddedMarkers → EmbeddedAudioMarkers. removePicture() removed (use EmbeddedArtwork.remove).
  • TagGroup moved out of spfk-metadata-base (it was ShadowTag-specific).
  • Error file-type payloads are UTType?, not AudioFileType?.
  • The TagLib bridge is internal to the package.

Upgrading

  • Raise floors to from: "2.0.0" for spfk-metadata, spfk-metadata-base and spfk-metadata-xmp.
  • Catch MetadataError.incompleteSave and clear only the dirty flags its written components cover
    (MetadataDirtyFlag.isFullyWritten(by:)).
  • Stored descriptions decode unchanged: readFailures is written only when a read failed, and
    renamed cases keep their raw values.