remove async

This commit is contained in:
jxxghp
2023-07-09 11:51:29 +08:00
parent ae10cd2a6b
commit 7f029d7389
15 changed files with 150 additions and 152 deletions

View File

@ -18,7 +18,7 @@ arr_router = APIRouter(tags=['servarr'])
@arr_router.get("/system/status", summary="系统状态")
async def arr_system_status(apikey: str) -> Any:
def arr_system_status(apikey: str) -> Any:
"""
模拟Radarr、Sonarr系统状态
"""
@ -36,7 +36,7 @@ async def arr_system_status(apikey: str) -> Any:
@arr_router.get("/qualityProfile", summary="质量配置")
async def arr_qualityProfile(apikey: str) -> Any:
def arr_qualityProfile(apikey: str) -> Any:
"""
模拟Radarr、Sonarr质量配置
"""
@ -54,7 +54,7 @@ async def arr_qualityProfile(apikey: str) -> Any:
@arr_router.get("/rootfolder", summary="根目录")
async def arr_rootfolder(apikey: str) -> Any:
def arr_rootfolder(apikey: str) -> Any:
"""
模拟Radarr、Sonarr根目录
"""
@ -75,7 +75,7 @@ async def arr_rootfolder(apikey: str) -> Any:
@arr_router.get("/tag", summary="标签")
async def arr_tag(apikey: str) -> Any:
def arr_tag(apikey: str) -> Any:
"""
模拟Radarr、Sonarr标签
"""
@ -93,7 +93,7 @@ async def arr_tag(apikey: str) -> Any:
@arr_router.get("/languageprofile", summary="语言")
async def arr_languageprofile(apikey: str) -> Any:
def arr_languageprofile(apikey: str) -> Any:
"""
模拟Radarr、Sonarr语言
"""
@ -124,7 +124,7 @@ async def arr_languageprofile(apikey: str) -> Any:
@arr_router.get("/movie", summary="所有订阅电影", response_model=List[schemas.RadarrMovie])
async def arr_movies(apikey: str, db: Session = Depends(get_db)) -> Any:
def arr_movies(apikey: str, db: Session = Depends(get_db)) -> Any:
"""
查询Rardar电影
"""
@ -220,7 +220,7 @@ async def arr_movies(apikey: str, db: Session = Depends(get_db)) -> Any:
@arr_router.get("/movie/lookup", summary="查询电影", response_model=List[schemas.RadarrMovie])
async def arr_movie_lookup(apikey: str, term: str, db: Session = Depends(get_db)) -> Any:
def arr_movie_lookup(apikey: str, term: str, db: Session = Depends(get_db)) -> Any:
"""
查询Rardar电影 term: `tmdb:${id}`
存在和不存在均不能返回错误
@ -271,7 +271,7 @@ async def arr_movie_lookup(apikey: str, term: str, db: Session = Depends(get_db)
@arr_router.get("/movie/{mid}", summary="电影订阅详情", response_model=schemas.RadarrMovie)
async def arr_movie(apikey: str, mid: int, db: Session = Depends(get_db)) -> Any:
def arr_movie(apikey: str, mid: int, db: Session = Depends(get_db)) -> Any:
"""
查询Rardar电影订阅
"""
@ -302,7 +302,7 @@ async def arr_movie(apikey: str, mid: int, db: Session = Depends(get_db)) -> Any
@arr_router.post("/movie", summary="新增电影订阅")
async def arr_add_movie(apikey: str, movie: RadarrMovie) -> Any:
def arr_add_movie(apikey: str, movie: RadarrMovie) -> Any:
"""
新增Rardar电影订阅
"""
@ -328,7 +328,7 @@ async def arr_add_movie(apikey: str, movie: RadarrMovie) -> Any:
@arr_router.delete("/movie/{mid}", summary="删除电影订阅", response_model=schemas.Response)
async def arr_remove_movie(apikey: str, mid: int, db: Session = Depends(get_db)) -> Any:
def arr_remove_movie(apikey: str, mid: int, db: Session = Depends(get_db)) -> Any:
"""
删除Rardar电影订阅
"""
@ -349,7 +349,7 @@ async def arr_remove_movie(apikey: str, mid: int, db: Session = Depends(get_db))
@arr_router.get("/series", summary="所有剧集", response_model=List[schemas.SonarrSeries])
async def arr_series(apikey: str, db: Session = Depends(get_db)) -> Any:
def arr_series(apikey: str, db: Session = Depends(get_db)) -> Any:
"""
查询Sonarr剧集
"""
@ -490,7 +490,7 @@ async def arr_series(apikey: str, db: Session = Depends(get_db)) -> Any:
@arr_router.get("/series/lookup", summary="查询剧集")
async def arr_series_lookup(apikey: str, term: str, db: Session = Depends(get_db)) -> Any:
def arr_series_lookup(apikey: str, term: str, db: Session = Depends(get_db)) -> Any:
"""
查询Sonarr剧集 term: `tvdb:${id}` title
"""
@ -577,7 +577,7 @@ async def arr_series_lookup(apikey: str, term: str, db: Session = Depends(get_db
@arr_router.get("/series/{tid}", summary="剧集详情")
async def arr_serie(apikey: str, tid: int, db: Session = Depends(get_db)) -> Any:
def arr_serie(apikey: str, tid: int, db: Session = Depends(get_db)) -> Any:
"""
查询Sonarr剧集
"""
@ -616,7 +616,7 @@ async def arr_serie(apikey: str, tid: int, db: Session = Depends(get_db)) -> Any
@arr_router.post("/series", summary="新增剧集订阅")
async def arr_add_series(apikey: str, tv: schemas.SonarrSeries) -> Any:
def arr_add_series(apikey: str, tv: schemas.SonarrSeries) -> Any:
"""
新增Sonarr剧集订阅
"""
@ -649,7 +649,7 @@ async def arr_add_series(apikey: str, tv: schemas.SonarrSeries) -> Any:
@arr_router.delete("/series/{tid}", summary="删除剧集订阅")
async def arr_remove_series(apikey: str, tid: int, db: Session = Depends(get_db)) -> Any:
def arr_remove_series(apikey: str, tid: int, db: Session = Depends(get_db)) -> Any:
"""
删除Sonarr剧集订阅
"""