Repository navigation
Report corrupted TAFs and allow redownloading them from the cloud - #565
Open
weatherhog wants to merge 2 commits into
Open
weatherhog wants to merge 2 commits into
weatherhog wants to merge 2 commits into
Conversation
moveTAF2Lib compared the existing library file only by its header SHA1. A TAF that is corrupted inside the audio (issue toniebox-reverse-engineering#346: a zero-filled region) has the same header as a fresh download, so the fresh copy was deleted and the corrupted one kept. The library file is now fully validated and replaced when it fails. With core.full_taf_validation a corrupted TAF source was also typed as a stream source, which re-encoded it with ffmpeg and set the tag to live and nocloud. The source type now only depends on the TAF header. Part of toniebox-reverse-engineering#338
The tag info now carries "corrupt" when the header of a TAF is fine but the SHA1 hash or length of the audio is not (found by the full validation or the track position check). getTagInfo?validate=true runs the full validation for one tag on demand. A tag that plays its own cloud content (a TAF in the content dir, or the library file it was cached to) gets a "redownloadUrl": the content download with force=true, which skips the local file and fetches from the cloud. If nothing gets cached, the previous source is restored. Tags with any other source are refused with 409, as the download clears the source. Part of toniebox-reverse-engineering#338
This was referenced Oct 26, 2026
Open
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.
Server side of #338. The first commit is the library fix from #564, so that one should be merged first.
The tag info now has corrupt: the header is fine, but SHA1 or length of the audio is not. getTagInfo?validate=true runs the full check for one tag on demand.
Tags that play their own cloud content get a redownloadUrl, the content download with force=true. It skips the local file and fetches from the cloud. If nothing gets cached, the previous source is restored. Tags with any other source get a 409, as the download clears the source. With cloud.cacheContent off there is nothing to replace the file with, so that is a 409 as well.
Two things I left as they are, because the normal download path does the same today: it is a GET like downloadTriggerUrl, and the source is empty while the download runs.
The web part is toniebox-reverse-engineering/teddycloud_web#354. tests/py/test_taf_redownload.py covers the server side. In my Docker setup test_settings_reload_while_cloud_requests_run fails, on develop as well (13 instead of 20 requests).