Skip to content

Commit 3d0d9f0

Browse files
max298Max Kammler
andauthored
make sure episodes get added to correct seasons (#19)
Co-authored-by: Max Kammler <max.kammler@icloud.com>
1 parent 181f9d0 commit 3d0d9f0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pyxtream/pyxtream.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,11 @@ def get_series_info_by_id(self, get_series: dict):
10231023
get_series.seasons[season_name] = season
10241024
if "episodes" in series_seasons.keys():
10251025
for series_season in series_seasons["episodes"].keys():
1026+
# add only episodes of current season
1027+
# use series_season as fallback to make sure episodes will be set
1028+
# if we can not parse the season number
1029+
if int(series_info.get('season_number', series_season)) != int(series_season):
1030+
continue
10261031
for episode_info in series_seasons["episodes"][str(series_season)]:
10271032
new_episode_channel = Episode(
10281033
self, series_info, "Testing", episode_info

0 commit comments

Comments
 (0)