fix sonarr
This commit is contained in:
parent
0a110fdfb4
commit
6288d5ccf2
@ -210,7 +210,6 @@ async def arr_movies(apikey: str, db: Session = Depends(get_db)) -> Any:
|
|||||||
tmdbId=subscribe.tmdbid,
|
tmdbId=subscribe.tmdbid,
|
||||||
profileId=1,
|
profileId=1,
|
||||||
qualityProfileId=1,
|
qualityProfileId=1,
|
||||||
added=True,
|
|
||||||
hasFile=False,
|
hasFile=False,
|
||||||
))
|
))
|
||||||
return result
|
return result
|
||||||
@ -238,19 +237,10 @@ async def arr_movie_lookup(apikey: str, term: str, db: Session = Depends(get_db)
|
|||||||
tmdbId=subscribe.tmdbid,
|
tmdbId=subscribe.tmdbid,
|
||||||
profileId=1,
|
profileId=1,
|
||||||
qualityProfileId=1,
|
qualityProfileId=1,
|
||||||
added=True,
|
|
||||||
hasFile=False,
|
hasFile=False,
|
||||||
)]
|
)]
|
||||||
else:
|
else:
|
||||||
return [RadarrMovie(
|
return [RadarrMovie()]
|
||||||
isAvailable=False,
|
|
||||||
monitored=False,
|
|
||||||
tmdbId=tmdbid,
|
|
||||||
profileId=1,
|
|
||||||
qualityProfileId=1,
|
|
||||||
added=False,
|
|
||||||
hasFile=False,
|
|
||||||
)]
|
|
||||||
|
|
||||||
|
|
||||||
@arr_router.get("/movie/{mid}", response_model=schemas.RadarrMovie)
|
@arr_router.get("/movie/{mid}", response_model=schemas.RadarrMovie)
|
||||||
@ -273,7 +263,6 @@ async def arr_movie(apikey: str, mid: int, db: Session = Depends(get_db)) -> Any
|
|||||||
tmdbId=subscribe.tmdbid,
|
tmdbId=subscribe.tmdbid,
|
||||||
profileId=1,
|
profileId=1,
|
||||||
qualityProfileId=1,
|
qualityProfileId=1,
|
||||||
added=True,
|
|
||||||
hasFile=False,
|
hasFile=False,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@ -463,7 +452,6 @@ async def arr_series(apikey: str, db: Session = Depends(get_db)) -> Any:
|
|||||||
profileId=1,
|
profileId=1,
|
||||||
languageProfileId=1,
|
languageProfileId=1,
|
||||||
qualityProfileId=1,
|
qualityProfileId=1,
|
||||||
added=True,
|
|
||||||
hasFile=False,
|
hasFile=False,
|
||||||
))
|
))
|
||||||
return result
|
return result
|
||||||
@ -501,21 +489,10 @@ async def arr_series_lookup(apikey: str, term: str, db: Session = Depends(get_db
|
|||||||
profileId=1,
|
profileId=1,
|
||||||
languageProfileId=1,
|
languageProfileId=1,
|
||||||
qualityProfileId=1,
|
qualityProfileId=1,
|
||||||
added=True,
|
|
||||||
hasFile=False,
|
hasFile=False,
|
||||||
)]
|
)]
|
||||||
else:
|
else:
|
||||||
return [SonarrSeries(
|
return [SonarrSeries()]
|
||||||
id=0,
|
|
||||||
isAvailable=False,
|
|
||||||
monitored=False,
|
|
||||||
profileId=1,
|
|
||||||
languageProfileId=1,
|
|
||||||
qualityProfileId=1,
|
|
||||||
added=False,
|
|
||||||
hasFile=False,
|
|
||||||
seasons=[]
|
|
||||||
)]
|
|
||||||
|
|
||||||
|
|
||||||
@arr_router.get("/series/{tid}")
|
@arr_router.get("/series/{tid}")
|
||||||
|
@ -6,8 +6,8 @@ class RadarrMovie(BaseModel):
|
|||||||
id: Optional[int]
|
id: Optional[int]
|
||||||
title: Optional[str]
|
title: Optional[str]
|
||||||
year: Optional[int]
|
year: Optional[int]
|
||||||
isAvailable: Optional[bool]
|
isAvailable: bool = False
|
||||||
monitored: Optional[bool]
|
monitored: bool = False
|
||||||
tmdbId: Optional[int]
|
tmdbId: Optional[int]
|
||||||
imdbId: Optional[str]
|
imdbId: Optional[str]
|
||||||
titleSlug: Optional[str]
|
titleSlug: Optional[str]
|
||||||
@ -16,7 +16,7 @@ class RadarrMovie(BaseModel):
|
|||||||
profileId: Optional[int]
|
profileId: Optional[int]
|
||||||
qualityProfileId: Optional[int]
|
qualityProfileId: Optional[int]
|
||||||
added: Optional[str]
|
added: Optional[str]
|
||||||
hasFile: Optional[bool]
|
hasFile: bool = False
|
||||||
|
|
||||||
|
|
||||||
class SonarrSeries(BaseModel):
|
class SonarrSeries(BaseModel):
|
||||||
@ -28,16 +28,16 @@ class SonarrSeries(BaseModel):
|
|||||||
overview: Optional[str]
|
overview: Optional[str]
|
||||||
network: Optional[str]
|
network: Optional[str]
|
||||||
airTime: Optional[str]
|
airTime: Optional[str]
|
||||||
images: Optional[list]
|
images: list = []
|
||||||
remotePoster: Optional[str]
|
remotePoster: Optional[str]
|
||||||
seasons: Optional[list]
|
seasons: list = []
|
||||||
year: Optional[int]
|
year: Optional[int]
|
||||||
path: Optional[str]
|
path: Optional[str]
|
||||||
profileId: Optional[int]
|
profileId: Optional[int]
|
||||||
languageProfileId: Optional[int]
|
languageProfileId: Optional[int]
|
||||||
seasonFolder: Optional[bool]
|
seasonFolder: bool = False
|
||||||
monitored: Optional[bool]
|
monitored: bool = False
|
||||||
useSceneNumbering: Optional[bool]
|
useSceneNumbering: bool = False
|
||||||
runtime: Optional[int]
|
runtime: Optional[int]
|
||||||
tvdbId: Optional[int]
|
tvdbId: Optional[int]
|
||||||
tvRageId: Optional[int]
|
tvRageId: Optional[int]
|
||||||
@ -48,9 +48,9 @@ class SonarrSeries(BaseModel):
|
|||||||
imdbId: Optional[str]
|
imdbId: Optional[str]
|
||||||
titleSlug: Optional[str]
|
titleSlug: Optional[str]
|
||||||
certification: Optional[str]
|
certification: Optional[str]
|
||||||
genres: Optional[list]
|
genres: list = []
|
||||||
tags: Optional[list]
|
tags: list = []
|
||||||
added: Optional[str]
|
added: Optional[str]
|
||||||
ratings: Optional[dict]
|
ratings: Optional[dict]
|
||||||
qualityProfileId: Optional[int]
|
qualityProfileId: Optional[int]
|
||||||
statistics: Optional[dict]
|
statistics: dict = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user