Repository navigation
Conversation
The web UI's tonie card builds the track download from the tag's audioUrl (/content/download/<ruid>), but only /content/<path> handled tracks=, so the whole TAF was served as Ogg instead of a zip. Resolve the tag's source (e.g. lib://) and use the same track export as /content/. Refs toniebox-reverse-engineering/teddycloud_web#350 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The zip of several exported tracks was built by spawning the external zip binary. That needs zip on the host (not available on native Windows) and Info-ZIP only marks entry names as UTF-8 when the server runs in a UTF-8 locale, so titles with non-ASCII characters showed up garbled (toniebox-reverse-engineering#552). zipWriteStored writes a store-only archive itself (Opus does not compress) and flags the entry names as UTF-8. The temp files get plain number names, the title only becomes the name of the zip entry. A truncated title no longer ends in half a UTF-8 character. zip is no longer installed in the runtime images. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Names the tracks of the generated TAF through the custom tonies API and checks the names in the exported zip: UTF-8 flag set, typographic quotes from toniebox-reverse-engineering#552 intact, a path separator replaced, and a title longer than the name buffer cut at a character boundary. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Problem
The zip for several exported tracks was built by running the external
zipbinary.„Allegro”) showed up garbled in the archive (Track split ZIP corrupts filenames containing special characters #552).Change
zipWriteStored(src/zip_writer.c) writes a store-only zip itself. Ogg/Opus does not compress, so no deflate is needed. It computes the CRC32 and sets the UTF-8 flag (general purpose bit 11) on the entry names. It is limited to the classic format: 65535 entries, 4 GiB.zip. The temp files get plain number names (02.ogg), the track title only becomes the name of the zip entry.sanitize_track_titleno longer cuts a title in the middle of a UTF-8 character when it truncates.zipis dropped from the runtime Docker images. The build stage still needs it formake zip.Tests
tests/c/test_zip_writer.c: known CRC32, UTF-8 flag, UTF-8 name preserved byte for byte, entry count, and a missing source file leaves no partial archive.test_zip_entry_names_are_utf8intests/py/test_track_export.py: the tracks get titles through the custom tonies API (typographic quotes from Track split ZIP corrupts filenames containing special characters #552, a/, and a title longer than the name buffer). It checks that the entries have the UTF-8 flag and the expected names, cut at a character boundary. It fails when the flag is not set.zipfile.testzip()verifies the CRCs), also with a failingzipshim first inPATH.unzip,7zand Python, also underLC_ALL=C.Not tested on Windows. The
windows-latestCI job should show that it builds.Fixes #552
🤖 Generated with Claude Code