Added chat announcement when a new clip is created.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 20s
CI / Tests (Python 3.13) (push) Successful in 19s
CI / Tests (Python 3.14) (push) Successful in 17s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (Python 3.12) (push) Successful in 20s
CI / Tests (Python 3.13) (push) Successful in 19s
CI / Tests (Python 3.14) (push) Successful in 17s
CI / Type Checking (push) Successful in 9s
CI / Spelling (push) Successful in 5s
This commit is contained in:
@@ -306,7 +306,13 @@ async def editor_submit(ctx: RouteContext) -> web.Response:
|
|||||||
thumbnail_path.unlink(missing_ok=True)
|
thumbnail_path.unlink(missing_ok=True)
|
||||||
|
|
||||||
ctx.logger.info(f"Clip {clip_id} ready ({actual_duration:.1f}s).")
|
ctx.logger.info(f"Clip {clip_id} ready ({actual_duration:.1f}s).")
|
||||||
return web.HTTPFound(ctx.routes.url_for(f"/clip/{clip_id}"))
|
|
||||||
|
clip_url = ctx.routes.url_for(f"/clip/{clip_id}")
|
||||||
|
await ctx.owncast_client.send_message(
|
||||||
|
f"{session.creator} created a clip: {clip_url}"
|
||||||
|
)
|
||||||
|
|
||||||
|
return web.HTTPFound(clip_url)
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
ctx.logger.error("Failed to create clip.", exc_info=True)
|
ctx.logger.error("Failed to create clip.", exc_info=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user