Repository navigation
Conversation
ID3 lists now split only on NUL, so a name like AC/DC stays one value and matches ffprobe. Matroska album follows the ALBUM tag ffmpeg writes without replacing the title. A JPEG title is stored as XPTitle and XMP dc:title. An MP4 video sample entry is read as video, and a cover role other than front survives a round trip.
ID3v2.2 is read and not written back as v2.2. Text lists split on NUL only. JPEG title, Matroska ALBUM, MP4 video size, and the covr picture role match the code.
Tagless files accept a title without writing an empty tag, picture roles and JPEG titles round-trip, and a rotated video reports the display size.
List the breaking changes (tagless Tag views, NUL-only ID3 lists, APE picture keys, MP4 video and picture roles), the additions (Mp4File.Video, the JPEG title, picture roles) and the fixes this branch makes.
The generic Enum.IsDefined overload exists from .NET 5. The guard only excluded netstandard2.0, so netstandard2.1 failed to compile (CS7036). Use the generic overload on NET5_0_OR_GREATER and the typeof form elsewhere.
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (77.98%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #186 +/- ##
==========================================
- Coverage 93.27% 93.21% -0.06%
==========================================
Files 558 560 +2
Lines 109406 110095 +689
Branches 14187 14373 +186
==========================================
+ Hits 102045 102630 +585
- Misses 4396 4506 +110
+ Partials 2965 2959 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Description
Stops several readers from returning a value the file does not store, or dropping one it does.
AC/DCread as two performers,ACandDC. Now it is one value. Track and discn/mand"(17)"as the ID3v1 genre Rock are unchanged.Tagused to benull. It is now a view that is always present: reading it writes nothing, and the first assignment creates the stored tag (ID3v2 for MP3, AAC, DSF, DFF, MPEG PS and AIFF; the Vorbis comment for FLAC; a RIFF INFO tag for WAV). A save writes an empty tag block only if it was assigned. A title can be set on a file that had no tag.ALBUMtag that ffmpeg writes, without replacing the title. When bothTITLEat target 50 andALBUMexist, setting the album updates both. If the only title is the untargeted one, it is kept asTITLEat target 30.XPTitle(0x9C9B) and XMPdc:title. It is added to Exif or XMP that is already there but lacks the field, and clearing the title removes both. Before, assigning a title changed nothing.videsample entry is read as video (width, height, codec), not as an audio sample rate. A 90 or 270 degree track matrix swaps the reported width and height, so a rotated video reports its display size. Public API:Mp4File.Video(see below).covrrole other than front now round-trips (stored in the top byte of a zero locale, one higher than the ID3 picture type; ExifTool still shows a normal cover). An APE picture with roleOtherkeeps itsCover Art (Other)key instead of becomingCover Art (Front).The README, ROADMAP and docs describe ID3 versions and the values stored: ID3v2.2 is read and is not written back as v2.2, and a new tag is v2.4.
Motivation and Context
Each of these returned a value that does not match what the file stores, or lost one on a round trip. The ID3 split was checked against ffprobe, and the JPEG title against what ExifTool and Exiv2 read. The Matroska behaviour matches the
ALBUMtag ffmpeg writes.No open issue is fully resolved by this branch, so there is no
Fixesline.Related, not closed: #167 (JPEG title, artist, description, copyright and year). This branch adds the title only.
Type of Change
Behaviour callers may rely on that changes:
Tagon a tagless MP3, AAC, DSF, DFF, MPEG PS, AIFF, WAV or FLAC file is no longernull. Code that testsfile.Tag is nullto mean "no tag" must test the stored tags instead.Mp4File.Videois a new public property (additive).Checklist
WrongValueTests.cs, Matroska and Mp3 tests, updated MP4, APE, FLAC, AIFF, MPEG PS and image tests)dotnet test): CI to confirmCHANGELOG.mdis not changed, see Additional NotesImplementation guide (docs/IMPLEMENTATION-GUIDE.md)
None of these are ticked: the commits show no design note, twin table, kit results or pre-review record. The tests do cite specs inline (ID3v2.4 structure, XMP Part 1, ISO/IEC 14496-12), and the tagless-file change was applied across sibling formats.
Commits
c67af1a6fix: Stop the remaining readers from dropping or inventing a value. Tagless files accept a title without writing an empty tag; picture roles and JPEG titles round-trip; a rotated video reports the display size.f4d4de57docs: Describe ID3 versions and the values this branch stores. README, ROADMAP and docs match the code for ID3 versions, JPEG title, Matroska ALBUM, MP4 video size and thecovrrole.7b2f80c7fix: Stop returning values the file does not store. ID3 lists split on NUL only, Matroska album followsALBUM, JPEG title is stored asXPTitleanddc:title, an MP4 video sample entry is read as video, and a non-front cover role survives a round trip.Testing
Not run for this description; CI will run the suite. New tests are in
tests/TagLibSharp2.Tests/Core/WrongValueTests.csandMatroska/MatroskaFileTests.cs. Existing tests that asserted the old behaviour were changed to the new one (Tagnull on a tagless file, slash-split artists, APEOtherkey, JPEG title not stored).Additional Notes
Public API snapshot: one added line,
public TagLibSharp2.Core.VideoProperties? Video { get; }onTagLibSharp2.Mp4.Mp4File.CHANGELOG.mdhas an[Unreleased]section with a Breaking Changes heading, and this branch does not add to it, including for theTagchange above.