Skip to content

Commit

Permalink
fix: Overseer API has inconsistant api, amend spokenLanguage model to…
Browse files Browse the repository at this point in the history
… match
  • Loading branch information
marksie1988 committed Apr 4, 2024
1 parent d9a9963 commit 4e60171
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 11 additions & 1 deletion asyncpow/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class GenreModel(BaseModel):
name: str


class SpokenLanguagesModel(BaseModel):
class SpokenLanguagesModelTv(BaseModel):
"""
Data class representing a spoken language.
"""
Expand All @@ -111,6 +111,16 @@ class SpokenLanguagesModel(BaseModel):
name: str


class SpokenLanguagesModelMovie(BaseModel):
"""
Data class representing a spoken language.
"""

english_name: str
iso_639_1: str
name: str


class ExternalIdsModel(BaseModel):
"""
Data class representing external IDs.
Expand Down
4 changes: 2 additions & 2 deletions asyncpow/models/movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
KeywordModel,
ProductionCompanyModel,
ProductionCountryModel,
SpokenLanguagesModel,
SpokenLanguagesModelMovie,
WatchProviderModel,
)

Expand Down Expand Up @@ -161,7 +161,7 @@ class MovieDetailsModel(BaseModel):
releases: dict
revenue: int
runtime: int
spokenLanguages: list[SpokenLanguagesModel]
spokenLanguages: list[SpokenLanguagesModelMovie]
status: str
tagline: str
title: str
Expand Down
4 changes: 2 additions & 2 deletions asyncpow/models/tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
KeywordModel,
ProductionCompanyModel,
ProductionCountryModel,
SpokenLanguagesModel,
SpokenLanguagesModelTv,
WatchProviderModel,
)

Expand Down Expand Up @@ -100,7 +100,7 @@ class TvDetailsModel(BaseModel):
popularity: float
productionCompanies: list[ProductionCompanyModel]
productionCountries: list[ProductionCountryModel]
spokenLanguages: list[SpokenLanguagesModel]
spokenLanguages: list[SpokenLanguagesModelTv]
seasons: list[SeasonModel]
status: str
tagline: str
Expand Down

0 comments on commit 4e60171

Please sign in to comment.