Skip to content

Commit

Permalink
Use section_id property
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jul 9, 2024
1 parent f1e4a43 commit 14386e7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions plextraktsync/plex/PlexLibraryItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ def section_id(self):

@cached_property
def is_discover(self):
# Use __dict__ access to prevent reloads:
# https://github.com/pkkid/python-plexapi/pull/1093
return self.item.__dict__["librarySectionID"] is None
return self.section_id is None

@property
def web_url(self):
Expand Down Expand Up @@ -128,10 +126,10 @@ def library(self):
if self.is_discover:
return None

if self.item.librarySectionID not in self.plex.library_sections:
if self.section_id not in self.plex.library_sections:
return None

return self.plex.library_sections[self.item.librarySectionID]
return self.plex.library_sections[self.section_id]

@cached_property
def edition_title(self):
Expand Down

0 comments on commit 14386e7

Please sign in to comment.