Inside Information On New Features….

So I decided that we need a way to handle multiple downloads without me having to dive into threads right now. I came up with a solution. The solution is both a good thing and a bad thing but I made a work-around for the braver people who find it to be a bad thing. The first part of the solutions is in a sense a process lock on the client. When you run vget it will check to see if the process is locked in the database. It does this with a “LockId” entry. If the process is not locked then it will lock it and start a download. When you run vget again with a new URL it will see that the process is locked and stick the permalinkId in a queue table and exit. When the process that is doing the downloading is finished with it’s current download it will check the queue table and start downloading the videos it finds in the table. Once it is completely finished with downloads it will then unlock the process and exit. For those who have good luck with multiple instances of vget running at the same time. You can call “vget unlock” to unlock the process and start vget with a new download. Personally I find vget to get a bit unstable at times when you have more than one instance running at a time so I recommend letting the download queue do it’s thing. I may add more command line arguments for starting vget in a no locking mode and for unlocking+downloading and such but for now. I will go ahead and say, leave the locking mechanism alone and be patient.

New code is NOT in SVN

Since this is a really experimental feature I’m not updating the SVN with it until I’m happy with it. Not to mention for some stupid reason the Makefile for vget is broken. I’m back to using ./build to test. The Makefile is complaining about undefined references to to the three new lock handling functions. Anyways, it is almost 6am and I need to get to sleep. I will let you guys know when I release this new code.

What is to come after this is released?

After I finish the download queue I will put checks in the code to prevent duplicate downloads. I have been planning on doing this for some time but just haven’t gotten around to it. This code will be really quick and easy to add so you can expect it pretty soon.

Leave a Reply