Skip to content

Commit

Permalink
Skip checking RTSP url for battery cameras to not wake them
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 16, 2024
1 parent 94a4de7 commit f34a957
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3057,9 +3057,15 @@ async def get_rtsp_stream_source(self, channel: int, stream: Optional[str] = Non
_LOGGER.debug("Checking RTSP urls host %s:%s, channel %s, stream %s", self._host, self._port, channel, stream)

if self.api_version("rtsp") >= 3 and stream == "main" and channel in self._rtsp_mainStream:
if self.supported(channel, "battery"):
_LOGGER.debug("Checking RTSP url host %s, channel %s, stream %s skipped because it is a battery camera", self._host, channel, stream)
return self._rtsp_mainStream[channel]
if await self._check_rtsp_url(self._rtsp_mainStream[channel], channel, stream):
return self._rtsp_mainStream[channel]
if self.api_version("rtsp") >= 3 and stream == "sub" and channel in self._rtsp_subStream:
if self.supported(channel, "battery"):
_LOGGER.debug("Checking RTSP url host %s, channel %s, stream %s skipped because it is a battery camera", self._host, channel, stream)
return self._rtsp_subStream[channel]
if await self._check_rtsp_url(self._rtsp_subStream[channel], channel, stream):
return self._rtsp_subStream[channel]

Expand Down

0 comments on commit f34a957

Please sign in to comment.