Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #64 from cpainchaud/main
Browse files Browse the repository at this point in the history
fixed inverted Rec and RecV20
  • Loading branch information
cpainchaud authored Nov 1, 2021
2 parents 140a9fa + 179360f commit 6c39d3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions reolink/camera_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,15 +897,16 @@ async def set_recording(self, enable):

if self._api_version_getrec <= 1:
body = [
{"cmd": "SetRecV20", "action": 0, "param": self._recording_settings["value"]}
{"cmd": "SetRec", "action": 0, "param": self._recording_settings["value"]}
]
body[0]["param"]["Rec"]["enable"] = new_value
body[0]["param"]["Rec"]["schedule"]["enable"] = new_value

else:
body = [
{"cmd": "SetRec", "action": 0, "param": self._recording_settings["value"]}
{"cmd": "SetRecV20", "action": 0, "param": self._recording_settings["value"]}
]
body[0]["param"]["Rec"]["schedule"]["enable"] = new_value
body[0]["param"]["Rec"]["enable"] = new_value


return await self.send_setting(body)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name='reolink',
packages=['reolink'],
version='0.0.40',
version='0.0.41',
license='MIT',
description='Reolink camera package',
author='fwestenberg',
Expand Down

0 comments on commit 6c39d3e

Please sign in to comment.