refactor(temp): read the free space where the failed step deletes its temp files

This commit is contained in:
imSp4rky
2026-11-29 15:23:03 -07:00
parent 977cbe4aa8
commit 1ebc3e3624
13 changed files with 155 additions and 59 deletions
+1 -1
View File
@@ -309,7 +309,7 @@ Each command reports how many files it removed and how much space it freed, then
**Inspect:** the connection to the CDN host dropped on every attempt. This is almost always the network, the VPN, or the proxy, not the service. Run the download again: unshackle keeps the segments it already has. Over HTTP/2, all segments share one connection, so one drop fails every segment in flight. Set `network.http1_only: true` (see [Network & proxy](../reference/configuration/network.md)) to spread them over separate connections. Operate unshackle with `-d` to see each retry as a `segment_retry` entry in the JSON debug log.
!!! example "The temp directory is nearly full"
**Symptom:** the failure line ends with the free space of the temp volume, for example `CalledProcessError: Command '[...]' returned non-zero exit status 2, 38.0 MB free on C:\unshackle\temp`. A tool such as shaka-packager often reports a full disk only as a write failure. A full disk during the mux gives a line like `mkvmerge failed (exit 2): An exception occurred when writing the destination file. The drive may be full. ..., 38.0 MB free on C:\unshackle\temp`.
**Symptom:** the failure line ends with the free space of the temp volume, for example `CalledProcessError: Command '[...]' returned non-zero exit status 2, 38.0 MB free on C:\unshackle\temp`. A tool such as shaka-packager often reports a full disk only as a write failure. A full disk during the mux gives a line like `mkvmerge failed (exit 2): An exception occurred when writing the destination file. The drive may be full. ..., 38.0 MB free on C:\unshackle\temp`. A hybrid step that fails on a full disk gives a line like `Hybrid 2160p failed, skipping it: [Errno 28] No space left on device, 38.0 MB free on C:\unshackle\temp`.
Before or during the track downloads, a warning can also show the problem, for example `Temp volume C:\unshackle\temp has 3.1 GB free, the selected tracks need about 9.4 GB`. unshackle gives this warning when the free space is less than two times the estimated size of the video and audio tracks of the title. The factor is two because each encrypted track and its decrypted copy are on the temp volume together.