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.
Create --max-actual-downloads #1686
Comments
|
What's the use case for this option? I'm not even certain what |
|
Hi In my scenario I don't want to download to many videos as I have very little storage space. Therefore limiting the numbers of downloads when downloading from a playlist is needed. |
|
But wouldn't it be much better to specify the size of the free disk space (or even gather that automatically)? If I have 10G free space, I'd be fine with downloading a hundred short video ads, but wouldn't want two gigantic 8GB-a-piece videos. By the way, if you want to limit the number of items you download from a playlist, you can simply use |
|
A storage option here can also work. Maybe even better but requires a little bit more of work to code. --playlist-end counts entries also. The bad part with that is if the playlist change. I use --match-title to pick my videos. |
Hi
The --max-downloads does not care about if the video has been downloaded now or not.
For backwardcompability it is better to create a new option rather then change.
In YoutubeDL.py line 546 should be moved to line 694 instead if the new option is active.
https://github.com/rg3/youtube-dl/blob/7193498811cb17a66ca57569a8588adb28ba2b27/youtube_dl/YoutubeDL.py#L546
https://github.com/rg3/youtube-dl/blob/7193498811cb17a66ca57569a8588adb28ba2b27/youtube_dl/YoutubeDL.py#L694
with same indention as Line 695