Skip to content

Commit

Permalink
Fix show only "other" seasons in episodes view
Browse files Browse the repository at this point in the history
  • Loading branch information
pannal committed Nov 26, 2023
1 parent 3858914 commit 61f91bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/windows/episodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def _setup(self, from_select_episode=False):

self.updateProperties()
self.fillEpisodes()
hasSeasons = self.fillSeasons(self.show_, seasonsFilter=lambda x: len(x) > 1)
hasSeasons = self.fillSeasons(self.show_, seasonsFilter=lambda x: len(x) > 1, selectSeason=self.season)
hasPrev = self.fillExtras(hasSeasons)

if not hasPrev and hasSeasons:
Expand Down
5 changes: 4 additions & 1 deletion lib/windows/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ def _createListItem(self, mediaItem, obj):
)
return mli

def fillSeasons(self, mediaItem, update=False, seasonsFilter=None):
def fillSeasons(self, mediaItem, update=False, seasonsFilter=None, selectSeason=None):
seasons = mediaItem.seasons()
if not seasons or (seasonsFilter and not seasonsFilter(seasons)):
return False

items = []
idx = 0
for season in seasons:
if selectSeason and season == selectSeason:
continue

mli = self._createListItem(mediaItem, season)
if mli:
mli.setProperty('index', str(idx))
Expand Down
4 changes: 2 additions & 2 deletions resources/language/resource.language.de_de/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1864,5 +1864,5 @@ msgid "Forced subtitles fix"
msgstr "Erzwungene Untertitel beheben"

msgctxt "#32942"
msgid "Seasons"
msgstr "Staffeln"
msgid "Other seasons"
msgstr "Weitere Staffeln"
2 changes: 1 addition & 1 deletion resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -1567,5 +1567,5 @@ msgid "Forced subtitles fix"
msgstr ""

msgctxt "#32942"
msgid "Seasons"
msgid "Other seasons"
msgstr ""

0 comments on commit 61f91bb

Please sign in to comment.