starkillerOG / reolink_aio

Reolink NVR/camera API PyPI package
MIT License
65 stars 13 forks source link

expand get_vod_source #51

Closed xannor closed 8 months ago

xannor commented 8 months ago

This expands get_vod_source to handle requesting differ vod playback urls, it also deprecates the download_vod function and removes the need of returning a stream from send.

starkillerOG commented 8 months ago

Please reformat using black so I can see the actual changes instead of all the formatting....

xannor commented 8 months ago

I did the edits in the same workspace as ha-core so it looks like they use different black settings than you so it formatted as per their rules. I manually ran black similar to your github test and commited those changes.

starkillerOG commented 8 months ago

@xannor I merged these canges in a seperate commit: https://github.com/starkillerOG/reolink_aio/commit/bb67959bdae7e6e01a6e2e79bfec36f109040794 because of the un-intended styling changes.

I made some small adjustments and tested it with my NVR: Playback and RTMP did not work, only FLV works. Probably because _generate_NVR_download_vod first needs to be called before RTMP or FLV can work since you need the filename there..... And on a NVR you first need to create the file....

Thanks for these improvements, hopefully you can now continue your work.