From 613bfdf96e9ad81200fc1f0030742e2cd30eaa83 Mon Sep 17 00:00:00 2001 From: bel Date: Tue, 2 Dec 2025 16:28:55 -0700 Subject: [PATCH] transcode entrypoint --- src/cmd/main.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/cmd/main.go b/src/cmd/main.go index 6ea4841..adc92df 100644 --- a/src/cmd/main.go +++ b/src/cmd/main.go @@ -60,6 +60,13 @@ func Main(ctx context.Context, args []string) error { return fmt.Errorf("errors: %+v", errs) } return nil + case Transcode: + for _, pos := range flags.Pos { + if err := inass.EntrypointTranscode(ctx, pos); err != nil { + return err + } + } + return nil default: panic(flags.Entrypoint.String()) } @@ -72,6 +79,7 @@ const ( Defacto Entrypoint = iota DeportAss BestAssToSRT + Transcode ) func (e *Entrypoint) Set(s string) error { @@ -82,11 +90,14 @@ func (e *Entrypoint) Set(s string) error { *e = DeportAss case BestAssToSRT.String(): *e = BestAssToSRT + case Transcode.String(): + *e = Transcode default: return fmt.Errorf("%s nin (%s)", s, strings.Join([]string{ Defacto.String(), DeportAss.String(), BestAssToSRT.String(), + Transcode.String(), }, ", ")) } return nil @@ -100,6 +111,8 @@ func (e Entrypoint) String() string { return "deport-ass" case BestAssToSRT: return "best-ass-to-srt" + case Transcode: + return "transcode" } panic("cannot serialize entrypoint") }