Remove residual fragments from failed video#157
Conversation
When a video failed due to unavailable fragments, a subsequent redownload will try to use the residual fragments from the previous download. This is because the download process did not go through to the point to have a video file and a thumbnail downloaded. Since the media.path did not synchronize with the actual calibre-web book path and no timestamp wasn't applied to the media.webpath, these residual fragments affects need to be removed.
|
Awesome if diagnostic understanding of yt-dlp and xklb is progressing! (Any prior tickets we should link to for community context?) |
|
@EMG70 just FYI progress is cooking, as we try to release for you ASAP:
ASIDE: @deldesir tested different versions of yt-dlp a month ago, and they generally ALL WORKED — so let's not over-interpret this 1 data point on #158: |
|
I tried to downloaded https://www.youtube.com/playlist?list=PL_c9BZzLwBRLVh9OdCBYFEql6esA6aRsi (102 videos) into t4 (Ubuntu 24.10) using #151, #155, #157. This 9-hour video failed to download:
|
|
Full results (from VM t4 above) — these 7 of 100 videos failed to download:
The other 6 videos were not successfully copied in the filesystem — and likewise each has the wrong CLARIF / JUST FYI: Only 100 of 102 were attempted, due to Lines 51 to 52 in 63ff431 |
|
@deldesir and I agreed to dig deeper before merging this PR: We need to try to understand the above timeout-like issue, which intermittently prevents videos from being copied from Very likely related: |

When a video failed due to unavailable fragments, a subsequent redownload will try to use the residual fragments from the previous download. This is because the download process did not go through to the point to have a video file and a thumbnail downloaded. Since the media.path did not synchronize with the actual calibre-web book path and no timestamp wasn't applied to the media.webpath, these residual fragments affects subsequent redownloads, thus their removal.