Finalize dev-1.3 upgrades and Seerr updates
This commit is contained in:
@@ -696,12 +696,13 @@ async def _fetch_all_jellyseerr_users(
|
||||
return save_jellyseerr_users_cache(users)
|
||||
return users
|
||||
|
||||
@router.post("/seerr/users/sync")
|
||||
@router.post("/jellyseerr/users/sync")
|
||||
async def jellyseerr_users_sync() -> Dict[str, Any]:
|
||||
runtime = get_runtime_settings()
|
||||
client = JellyseerrClient(runtime.jellyseerr_base_url, runtime.jellyseerr_api_key)
|
||||
if not client.configured():
|
||||
raise HTTPException(status_code=400, detail="Jellyseerr not configured")
|
||||
raise HTTPException(status_code=400, detail="Seerr not configured")
|
||||
jellyseerr_users = await _fetch_all_jellyseerr_users(client, use_cache=False)
|
||||
if not jellyseerr_users:
|
||||
return {"status": "ok", "matched": 0, "skipped": 0, "total": 0}
|
||||
@@ -733,12 +734,13 @@ def _pick_jellyseerr_username(user: Dict[str, Any]) -> Optional[str]:
|
||||
return None
|
||||
|
||||
|
||||
@router.post("/seerr/users/resync")
|
||||
@router.post("/jellyseerr/users/resync")
|
||||
async def jellyseerr_users_resync() -> Dict[str, Any]:
|
||||
runtime = get_runtime_settings()
|
||||
client = JellyseerrClient(runtime.jellyseerr_base_url, runtime.jellyseerr_api_key)
|
||||
if not client.configured():
|
||||
raise HTTPException(status_code=400, detail="Jellyseerr not configured")
|
||||
raise HTTPException(status_code=400, detail="Seerr not configured")
|
||||
jellyseerr_users = await _fetch_all_jellyseerr_users(client, use_cache=False)
|
||||
if not jellyseerr_users:
|
||||
return {"status": "ok", "imported": 0, "cleared": 0}
|
||||
@@ -772,7 +774,7 @@ async def requests_sync() -> Dict[str, Any]:
|
||||
runtime = get_runtime_settings()
|
||||
client = JellyseerrClient(runtime.jellyseerr_base_url, runtime.jellyseerr_api_key)
|
||||
if not client.configured():
|
||||
raise HTTPException(status_code=400, detail="Jellyseerr not configured")
|
||||
raise HTTPException(status_code=400, detail="Seerr not configured")
|
||||
state = await requests_router.start_requests_sync(
|
||||
runtime.jellyseerr_base_url, runtime.jellyseerr_api_key
|
||||
)
|
||||
@@ -785,7 +787,7 @@ async def requests_sync_delta() -> Dict[str, Any]:
|
||||
runtime = get_runtime_settings()
|
||||
client = JellyseerrClient(runtime.jellyseerr_base_url, runtime.jellyseerr_api_key)
|
||||
if not client.configured():
|
||||
raise HTTPException(status_code=400, detail="Jellyseerr not configured")
|
||||
raise HTTPException(status_code=400, detail="Seerr not configured")
|
||||
state = await requests_router.start_requests_delta_sync(
|
||||
runtime.jellyseerr_base_url, runtime.jellyseerr_api_key
|
||||
)
|
||||
@@ -902,7 +904,7 @@ async def requests_cache(limit: int = 50) -> Dict[str, Any]:
|
||||
logger.info("Requests cache titles repaired via settings view: %s", repaired)
|
||||
hydrated = await _hydrate_cache_titles_from_jellyseerr(limit)
|
||||
if hydrated:
|
||||
logger.info("Requests cache titles hydrated via Jellyseerr: %s", hydrated)
|
||||
logger.info("Requests cache titles hydrated via Seerr: %s", hydrated)
|
||||
rows = get_request_cache_overview(limit)
|
||||
return {"rows": rows}
|
||||
|
||||
@@ -1073,7 +1075,7 @@ async def user_system_action(username: str, payload: Dict[str, Any]) -> Dict[str
|
||||
"username": user.get("username"),
|
||||
"local": {"status": "pending"},
|
||||
"jellyfin": {"status": "skipped", "detail": "Jellyfin not configured"},
|
||||
"jellyseerr": {"status": "skipped", "detail": "Jellyseerr not configured or no linked user ID"},
|
||||
"jellyseerr": {"status": "skipped", "detail": "Seerr not configured or no linked user ID"},
|
||||
"invites": {"status": "pending", "disabled": 0},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user