Skip to content

Commit

Permalink
fix season 0
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Jul 6, 2023
1 parent a81a22c commit 3609033
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/modules/themoviedb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ def tmdb_seasons(self, tmdbid: int) -> List[schemas.TmdbSeason]:
tmdb_info = self.tmdb.get_info(tmdbid=tmdbid, mtype=MediaType.TV)
if not tmdb_info:
return []
return [schemas.TmdbSeason(**season) for season in tmdb_info.get("seasons", [])]
return [schemas.TmdbSeason(**season)
for season in tmdb_info.get("seasons", []) if season.get("season_number")]

def tmdb_episodes(self, tmdbid: int, season: int) -> List[schemas.TmdbEpisode]:
"""
Expand Down

0 comments on commit 3609033

Please sign in to comment.