Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Merged format fails with %(format_id)s in output template path #14116
Comments
|
Additional information from my examination of the code: What's incorrect, then, is the merge code, which seems to be assuming that the directory locations for the temporary This analysis is further supported by the following output, where the
|
|
@dstftw Thanks for the fix, it works pretty well with one exception... After the merge, when the temporary .f136.mp4 and .f140.m4a files are deleted, the (now-empty) directories (i.e. ...\136\..., ...\140\... remain. Would there be a way to store a flag value that indicates whether each of those directories had been created during a particular download operation, and if so, delete the directory when the single temporary file it contains is deleted? It could skip this step if it contains any files other than the one it expects to be there. If this is worth fixing, would you want me to open a new bug for this? |
An output template such as:
...crashes when the
format_idrefers to a merged format such as 136+140, because the template resolves to different directories during different stages of the download.This command fails with [Errno 2] No such file or directory: 'C:\yt136\BaW_jenozKc.f136.mp4.part'. The full output is below; note that the Json file was correctly downloaded to C:\yt136+140\..., but the video download fails, possibly because it's targeting a directory C:\yt136\... which does not exist.