Feat: Enhance library management features

- Adds strict HTTP/HTTPS validation when creating library websites.
- Improves summary cleanup in video ingestion by removing thinking tags and prefixes.
- Updates LibraryManager UI to display comprehensive metadata (ID, provider, upload date, character count, etc.) and improves video source handling.
This commit is contained in:
2026-06-15 06:17:50 +02:00
parent 5df2871c6f
commit e9e7df7e20
3 changed files with 16 additions and 4 deletions

View File

@@ -351,7 +351,8 @@ async def _summarize(title: str, transcript: str, model_name: str) -> str:
],
options={"num_ctx": _choose_num_ctx(prompt)},
)
clean = str(summary or "").strip()
clean = re.sub(r"<think>.*?</think>", "", str(summary or ""), flags=re.DOTALL | re.IGNORECASE).strip()
clean = re.sub(r"^\s*Summary:\s*", "", clean, flags=re.IGNORECASE).strip()
if not clean:
raise RuntimeError("Ollama returned an empty video summary.")
return clean