Repository navigation
feat: Save Matroska and WebM tags - #106
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #106 +/- ##
==========================================
- Coverage 93.19% 93.07% -0.13%
==========================================
Files 276 278 +2
Lines 51734 53151 +1417
Branches 4595 4831 +236
==========================================
+ Hits 48214 49470 +1256
- Misses 2078 2168 +90
- Partials 1442 1513 +71 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
decriptor
force-pushed
the
feat/matroska-save
branch
from
November 17, 2026 03:21
45df860 to
4c73131
Compare
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Saves Matroska and WebM tag values by splicing
MatroskaTag.Renderinto the first Segment. An unknown-size Segment ends at the next EBML header or the next Segment, and the bytes after that are copied unchanged.MediaFile.Read(string)now setsSourcePathfor Matroska soSaveToFile()can write back throughAtomicFileWriter. A failed rewrite does not touch the destination.Round-trips the fields the reader already maps: title, artist, performers, album, album artist, year, comment, genre, track, total tracks, composer, copyright, description, lyrics, conductor, and publisher. Clearing a value removes it. WebM keeps its DocType.
Cluster, attachment, and cue payload bytes are copied through. A title edit does not move or alter a known-size Cluster (duration, sample rate, and picture bytes stay). An unknown-size tail that has to move gets
CueClusterPositionupdated, including the Cues CRC-32.SeekHeadentries forTagsare rewritten when the new Segment position fits in the existingSeekelement; otherwise that entry is replaced withVoidso it cannot point at the old offset. A newSeekis added only when aVoidinside or directly after theSeekHeadis large enough.Files the reader cannot bound (an unknown-size element that does not parse through to a sibling or the parent end, or a gap after the first element) fail the save and are left unchanged. Nothing is resynced by scanning media bytes.
Not rewritten
Attachmentselements are preserved; the Pictures setter still does not emit them.Chapterselements andFlagEnabled. A Tag aimed at a chapter, track, edition, or attachment is copied back unchanged. A file-level tag keeps its target UIDs,TagLanguage,TagLanguageBCP47, andTagBinary.AlbumArtistSortandComposerSort.Cluster, including an in-clusterPosition.Fixes #53