Skip to content

Commit

Permalink
Merge pull request #1620 from glensc/season-index
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc authored Oct 26, 2023
2 parents e45577c + 6792eb8 commit 469cee9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plextraktsync/plex/PlexLibraryItem.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,13 @@ def episodes(self):

@retry()
def _get_episodes(self):
show_id = self.item.parentRatingKey if self.type == "season" else self.item.ratingKey
return self.library.search(libtype='episode', filters={'show.id': show_id})
if self.type == "season":
show_id = self.item.parentRatingKey
season = self.item.seasonNumber

return self.library.search(libtype='episode', filters={'show.id': show_id, 'season.index': season})

return self.library.search(libtype='episode', filters={'show.id': self.item.ratingKey})

@cached_property
def season_number(self):
Expand Down

0 comments on commit 469cee9

Please sign in to comment.