Sandman Queue Runner
Ah, the perils of a slow Internet.
I pretty much cannot watch Youtube videos directly in my browser. They start playing, and I watch the buffer grow to about one third, then stop. The player quickly hits this one third mark and I get the spinning buffering symbol. Forever.
Not to worry, there is software called youtube-dl which can download youtube videos. That means that I have to wait for them to finish downloading before I can watch them, but that's what I get with my slow Internet.
But what if I want to download 7 youtube videos? The program has a helpful read URLs from a file option. But it reads the file at the beginning.
What if I want to add more videos after starting? Well, youtube-dl can resume downloading a video in the middle, so Ctrl-C and restart.
What if the first video in the list is HUUGGE and I want some of the later ones to run first? Edit the file, Ctrl-C and restart.
What if the file was already downloaded? Either edit the file, Ctrl-C and restart, or use the archiving feature. But eventually I have to edit the file to remove the ones that are completed, or else I see a spew of all ready downloaded.
I'm a big believer in that's the computer's job. So I wrote a bizarro world queuing system for myself.
It listens for URLs and adds them to the queue. It runs one at a time in submitted order, but it also has a configurable cycle time. So for example, it will run the first one for 2 minutes, then push it to the end of the queue and run the next one for two minutes. It adapts the duration to how long the queue is, so if there is only one entry, it just runs. I can also override the queue rolling to make it finish a video I particularly want and I can change the run time while it is running. And I can delete an entry while it is running.
It doesn't do any of these things really brilliantly, but it does them in code with me only having to poke the right buttons.
That's what I did on Mother's Day after talking to my mom.