From 486d9c97428d52f031256327267a509d570c473f Mon Sep 17 00:00:00 2001 From: Ryan Meek <25127328+maykar@users.noreply.github.com> Date: Sun, 28 Feb 2021 18:55:38 -0500 Subject: [PATCH] Support missing libraries --- custom_components/plex_assistant/plex_assistant.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/plex_assistant/plex_assistant.py b/custom_components/plex_assistant/plex_assistant.py index b6eafd2..8c337d2 100644 --- a/custom_components/plex_assistant/plex_assistant.py +++ b/custom_components/plex_assistant/plex_assistant.py @@ -40,4 +40,5 @@ def update_libraries(self): self.media["updated"] = datetime.now() def get_section_id(self, section): - return self.library.search(libtype=section, limit=1)[0].librarySectionID + section = self.library.search(libtype=section, limit=1) + return None if not section else section[0].librarySectionID