Automate repair completion confirmation
Magent CI/CD / verify (push) Canceled after 4m31s
Magent CI/CD / deploy-prod (push) Canceled after 0s
Magent CI/CD / deploy-beta (push) Canceled after 0s

This commit is contained in:
2026-09-01 22:37:23 +12:00
parent ded794a819
commit 0b59289a2e
4 changed files with 413 additions and 6 deletions
+21
View File
@@ -192,6 +192,7 @@ class JellyfinClient(ApiClient):
"SearchTerm": term,
"IncludeItemTypes": ",".join(item_types or []),
"Recursive": "true",
"Fields": "Path,MediaSources",
"Limit": limit,
}
headers = self._emby_headers()
@@ -219,6 +220,26 @@ class JellyfinClient(ApiClient):
)
raise
async def get_series_episodes(self, series_id: str) -> list[Dict[str, Any]]:
if not self.base_url or not self.api_key or not str(series_id).strip():
return []
url = f"{self.base_url}/Items"
params = {
"ParentId": str(series_id).strip(),
"IncludeItemTypes": "Episode",
"Recursive": "true",
"Fields": "Path,ProviderIds,MediaSources",
"Limit": 10000,
}
async with httpx.AsyncClient(timeout=20.0) as client:
response = await client.get(url, headers=self._emby_headers(), params=params)
response.raise_for_status()
payload = response.json()
if not isinstance(payload, dict):
return []
items = payload.get("Items") or payload.get("items") or []
return [item for item in items if isinstance(item, dict)] if isinstance(items, list) else []
async def get_system_info(self) -> Optional[Dict[str, Any]]:
if not self.base_url or not self.api_key:
return None