Skip to content

Commit

Permalink
Use section.totalViewSize method
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Sep 14, 2023
1 parent cae6cac commit 92efa44
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plextraktsync/plex/PlexShowSectionPager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ def __len__(self):

@cached_property
def total_size(self):
maxresults = self.section.searchEpisodes(maxresults=0)
try:
return maxresults.total_size
except AttributeError:
raise RuntimeError("Needs PlexAPI patch")
return self.section.totalViewSize(libtype="episode")

def __iter__(self):
from plexapi import X_PLEX_CONTAINER_SIZE
Expand Down

0 comments on commit 92efa44

Please sign in to comment.