Tedyst / HikLoad

Download videos from a HikVision DVR/NVR
MIT License
76 stars 26 forks source link

Error when downloading single file #15

Closed MinseokKang003 closed 2 years ago

MinseokKang003 commented 2 years ago

Hi, Thanks for the awesome package.

I found an error when trying to download a single recording.

I think the error occurs because the received recording data format is different when there are multiple recordings, and only one recording.

When there is only one recording, I needed to fix the existing code to this and remove the for loop. recording = recordings['CMSearchResult']['matchList']['searchMatchItem']

I hope this issue could be fixed.

I'm sorry I couldn't help much, I'm a noob in Python.

Tedyst commented 2 years ago

I pushed to master a fix to this issue. Can you please verify that it works as intented? Thanks.

MinseokKang003 commented 2 years ago

Works as intended. Thanks!