From f01fd0ca84d203005de469658d33208538d771fa Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 23 Jun 2025 08:28:49 +0100 Subject: [PATCH] check if output is paused before attempting record split/chapter. add note to changelog about supported file format for record chapter. --- CHANGELOG.md | 1 + record.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 605f500..76256c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - record split and record chapter commands, see [RecordCmd](https://github.com/onyx-and-iris/gobs-cli?tab=readme-ov-file#recordcmd) + - As of OBS 30.2.0, the only file format supporting *record chapter* is Hybrid MP4. # [0.12.1] - 2025-06-21 diff --git a/record.go b/record.go index 3b670d4..4df0f15 100644 --- a/record.go +++ b/record.go @@ -204,6 +204,9 @@ func (cmd *RecordSplitCmd) Run(ctx *context) error { if !status.OutputActive { return fmt.Errorf("recording is not in progress") } + if status.OutputPaused { + return fmt.Errorf("recording is paused, cannot split") + } _, err = ctx.Client.Record.SplitRecordFile() if err != nil { @@ -229,6 +232,9 @@ func (cmd *RecordChapterCmd) Run(ctx *context) error { if !status.OutputActive { return fmt.Errorf("recording is not in progress") } + if status.OutputPaused { + return fmt.Errorf("recording is paused, cannot create chapter") + } var params *record.CreateRecordChapterParams if cmd.ChapterName == "" {