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