KoenZomers / RingRecordingDownload

Console Application for Windows, Raspberry Pi, Linux and macOS which allows for downloading of Ring recorded events
Apache License 2.0
20 stars 9 forks source link

startdate/enddate aren't picking up (optional) time part of the argument #8

Closed dbkinder1 closed 4 years ago

dbkinder1 commented 4 years ago

Assuming I've got the format right (as presented in the online examples), the tool is parsing the date, but not the time from the command line. (Notice the output from the command isn't picking up the time part of the -enddate argument.)

C:\Users\DAVID\Downloads\KoenZomers.Ring.Api>RingRecordingDownload.exe -out K:\RingVideos -username xxxxxxx  -password yyyyyyyyy -startdate 03-05-2020 00:00:00 -enddate 03-05-2020 11:17:00

Ring Recordings Download Tool v2.0.1 by Koen Zomers

Connecting to Ring services
Authenticating using refresh token from previous session
Downloading all historical events between Thursday 5 March 2020 00:00:00 and Thursday 5 March 2020 00:00:00
0 items found, downloading to K:\RingVideos
Done
dbkinder1 commented 4 years ago

The problem is the argument parsing code only is looking at the first argument after the "-startdate" (which is the date) and because of the space between the date/time, it's not picking up the time part when parsing the datetime string. As a work-around I tried using

-startdate 2020-03-05T00:00:00 -enddate 2020-03-05T11:17:00

(to remove the space between date and time), and it worked fine and as expected.

KoenZomers commented 4 years ago

Very well noticed @dbkinder1! Thanks for sharing your workaround as well. Another option would be to wrap the date/time in (double or single) quotes, i.e.:

.\RingRecordingDownload.exe -username user@domain.com -password mysupersecretpassword -startdate '12-03-2020 16:15:00'

I'll update the samples in the tool to reflect this.

KoenZomers commented 4 years ago

Resolved in version 2.0.1.1. Thanks for your contribution!

dbkinder1 commented 4 years ago

Thanks @KoenZomers and for completeness you might update the images in https://github.com/KoenZomers/RingRecordingDownload/blob/master/README.md that are missing quoted date/time arguments. :)

BTW, by using your nice ring downloader, together with mp4joiner to glue the individual videos together, and ffmpeg to speed up the combined videos by 60x, I'm creating a timelapse of a 2-month long home construction project.

KoenZomers commented 4 years ago

Done!

Cool idea about the timelapse!