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

Commit 5fded72

Browse files
committed
Currently we don't support Arlo DoorBells and this code is a temporary
workaround to get the media library loaded when a doorbell is present.
1 parent 47f7934 commit 5fded72

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

pyarlo/media.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,14 @@ def load(self, days=PRELOAD_DAYS, only_cameras=None,
6262

6363
for video in data:
6464
# pylint: disable=cell-var-from-loop
65-
srccam = \
66-
list(filter(
67-
lambda cam: cam.device_id == video.get('deviceId'),
68-
all_cameras)
69-
)[0]
65+
try:
66+
srccam = \
67+
list(filter(
68+
lambda cam: cam.device_id == video.get('deviceId'),
69+
all_cameras)
70+
)[0]
71+
except IndexError:
72+
continue
7073

7174
# make sure only_cameras is a list
7275
if only_cameras and \

0 commit comments

Comments
 (0)