Skip to content

Commit

Permalink
Fix wrong camera_hardware_version for NVRs
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Nov 4, 2024
1 parent 5fbac26 commit 62d0efc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,10 @@ def camera_name(self, channel: int | None) -> str:
if channel is None:
return self.nvr_name

if channel not in self._channel_names and channel in self._stream_channels and channel != 0:
if not self.is_nvr and channel not in self._channel_names and channel in self._stream_channels and channel != 0:
return self.camera_name(0) # Dual lens cameras
if channel not in self._channel_names:
if len(self._channels) == 1:
if not self.is_nvr:
return self.nvr_name
return "Unknown"
return self._channel_names[channel]
Expand Down Expand Up @@ -687,7 +687,7 @@ def camera_online(self, channel: int) -> bool:
def camera_model(self, channel: int | None) -> str:
if channel is None:
return self.model
if channel not in self._channel_models and channel in self._stream_channels and channel != 0:
if not self.is_nvr and channel not in self._channel_models and channel in self._stream_channels and channel != 0:
return self.camera_model(0) # Dual lens cameras
if channel not in self._channel_models:
return "Unknown"
Expand All @@ -696,7 +696,7 @@ def camera_model(self, channel: int | None) -> str:
def camera_hardware_version(self, channel: int | None) -> str:
if channel is None:
return self.hardware_version
if channel not in self._channel_hw_version and channel in self._stream_channels and channel != 0:
if not self.is_nvr and channel not in self._channel_hw_version and channel in self._stream_channels and channel != 0:
return self.camera_hardware_version(0) # Dual lens cameras
if channel not in self._channel_hw_version:
if not self.is_nvr:
Expand Down

0 comments on commit 62d0efc

Please sign in to comment.