Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #104 from tchellomello/issue_103_retrieving_media_…
Browse files Browse the repository at this point in the history
…doorbell

ArloMedia does not work when a doorbell device is linked in the account
  • Loading branch information
tchellomello authored Dec 6, 2020
2 parents c1703d8 + d8e551d commit a33400a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pyarlo/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,14 @@ def load(self, days=PRELOAD_DAYS, only_cameras=None,

for video in data:
# pylint: disable=cell-var-from-loop
srccam = \
list(filter(
lambda cam: cam.device_id == video.get('deviceId'),
all_cameras)
)[0]
try:
srccam = \
list(filter(
lambda cam: cam.device_id == video.get('deviceId'),
all_cameras)
)[0]
except IndexError:
continue

# make sure only_cameras is a list
if only_cameras and \
Expand Down

0 comments on commit a33400a

Please sign in to comment.