fix douban api
This commit is contained in:
@ -67,7 +67,10 @@ async def douban_movies(sort: str = "R",
|
|||||||
if not movies:
|
if not movies:
|
||||||
return []
|
return []
|
||||||
medias = [MediaInfo(douban_info=movie) for movie in movies]
|
medias = [MediaInfo(douban_info=movie) for movie in movies]
|
||||||
return [media.to_dict() for media in medias if media.poster_path]
|
return [media.to_dict() for media in medias
|
||||||
|
if media.poster_path
|
||||||
|
and "movie_large.jpg" not in media.poster_path
|
||||||
|
and "tv_normal.png" not in media.poster_path]
|
||||||
|
|
||||||
|
|
||||||
@router.get("/tvs", summary="豆瓣剧集", response_model=List[schemas.MediaInfo])
|
@router.get("/tvs", summary="豆瓣剧集", response_model=List[schemas.MediaInfo])
|
||||||
@ -83,8 +86,11 @@ async def douban_tvs(sort: str = "R",
|
|||||||
sort=sort, tags=tags, page=page, count=count)
|
sort=sort, tags=tags, page=page, count=count)
|
||||||
if not tvs:
|
if not tvs:
|
||||||
return []
|
return []
|
||||||
medias = [MediaInfo(douban_info=tv).to_dict() for tv in tvs]
|
medias = [MediaInfo(douban_info=tv) for tv in tvs]
|
||||||
return [media.to_dict() for media in medias if media.poster_path]
|
return [media.to_dict() for media in medias
|
||||||
|
if media.poster_path
|
||||||
|
and "movie_large.jpg" not in media.poster_path
|
||||||
|
and "tv_normal.png" not in media.poster_path]
|
||||||
|
|
||||||
|
|
||||||
@router.get("/movie_top250", summary="豆瓣电影TOP250", response_model=List[schemas.MediaInfo])
|
@router.get("/movie_top250", summary="豆瓣电影TOP250", response_model=List[schemas.MediaInfo])
|
||||||
|
Reference in New Issue
Block a user