Repository navigation
fix: Write every ID3v2 frame in an encoding and layout its version defines, and bound the work on crafted tags - #276
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #276 +/- ##
==========================================
+ Coverage 93.88% 93.94% +0.05%
==========================================
Files 633 643 +10
Lines 117480 119109 +1629
Branches 15694 15950 +256
==========================================
+ Hits 110300 111900 +1600
- Misses 4146 4160 +14
- Partials 3034 3049 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
747653a to
04bae2d
Compare
… read or save, and fail a save whose tag is too large for its size (#275)
04bae2d to
4f6639e
Compare
|
Review: 0 findings at 4f6639e. What was checked:
History: 7 commits, one per issue, so this is rebase-merged rather than squashed. |
Description
ID3v2 tags are now always written with frames and encodings their version defines, and every value written reads back through this library. Each issue has its own commit.
36846dc0(#255)afe3b147(#261)CHAPandCTOCembed are written and read with the tag version's frame header and flags. A v2.3 chapter title of 128 bytes or more used to read back as null.1a4fd501(#262)?. A frame set to text its encoding cannot hold switches to one that can: UTF-8 in v2.4, UTF-16 with a BOM in v2.3. Before, Japanese text set on an ISO-8859-1 frame was written as??.09680515(#265)CHAPandCTOCkept only their title and dropped every other embedded frame (subtitle, URL, image, unknown frames) on any save. Now an unedited chapter is written as it was read, a title edit replaces the title in place, and a chapter moved between tag versions converts what it can.d6fe68e8(#266)?. A read returns the encoded form.7c6cd009(#272)4f6639e3(#275)Checked against ffprobe, exiftool (plain,
-aand-validate) and MediaInfo on real v2.2, v2.3 and v2.4 MP3s:Motivation and Context
#255 was found by the review of the 0.7.0 docs (PR #254), which ran the QuickStart album-art sample and read the file back. Sweeping every frame type that carries a text encoding then found #261, #262 and #266. #265 and #272 came from the review of those fixes. All of them date from the first ID3v2 implementation.
Fixes #255
Fixes #261
Fixes #262
Fixes #265
Fixes #266
Fixes #272
Fixes #275
Related and still open, moved to v0.8.0:
Type of Change
Behaviour callers may rely on that changes:
RenderContent ()writes the v2.4 form. It is the same as before, except that text the frame's encoding cannot hold now switches encoding.Id3v2Tag.Render ()throws a documentedInvalidOperationExceptionin that case.No public API is added or removed.
Checklist
dotnet format --verify-no-changespasses)dotnet test): see TestingImplementation guide
Testing
At head
4f6639e3: a Release build of all target frameworks with 0 warnings, anddotnet format --verify-no-changesclean.