morrisonbrett / BlackVueDownloader

BlackVue Downloader - Download video files from your BlackVue camera over http
MIT License
86 stars 14 forks source link

Handle dropped connection #20

Open ThunderCluck78 opened 6 years ago

ThunderCluck78 commented 6 years ago

This is a fantastic application and it works great. Used it on Windows 10 for a brief period and no problems. Just installed on a Ubuntu 16.04 Server and works smooth as silk.

Wondering if it would be possible to convert this to a service that is continually running in the background. Biggest challenge I think would be writing a separate thread that is periodically testing network connectivity to the camera and if no connection is available, pause the download until one is detected..

As it is now, I plan to write some simple shell scripts as a sort of wrapper to the application that can manage scheduling, logging, emailing and some file management and possibly manage the network connection so if it drops while script is running, the script will be aborted so it doesn't hang. I haven't noticed that the current application is capable of handling this gracefully, it seem to just hang, even after the connection comes back.

I am new to BlackVue (and I am still just playing with the camera in my home, so I haven't installed in auto yet) so not entirely familiar with how they tag/label/name their files that capture certain events. If you have gained any insight would you mind sharing? It would be very helpful for file management.

Thank!!

morrisonbrett commented 6 years ago

I think that's a good idea. I would have to think of a way to make it a "portable" service that runs on Linux, macOS, and Windows though. That - or include .sh, .bat | .psh files that facilitate setting up a service harness for each OS. Glad you're enjoying it. Feel free to improve it and create a Pull Request if you do decide to contribute your work back to this code base!

CurlyFlow commented 3 years ago

maybe just create a docker! so you dont need to write for every OS. and docker can be run on every other OS.