enable ffmpeg functionality outside the GUI paths
Some checks are pending
Build for Android / build (push) Waiting to run
Build for ARMv6 (32-bit) / build (push) Waiting to run
Build for ARMv8 (64-bit) / build (push) Waiting to run
Build for Linux / build (push) Waiting to run
Build for MacOS Intel / build (push) Waiting to run
Build for MacOS Apple Silicon / build (push) Waiting to run
Build for Windows / build (push) Waiting to run
Tests / build (push) Waiting to run

the GUI creates TVPayload directly, and supplies FFmpegPath. the other code paths use NewTVPayload to construct the TVPayload. assigning FFmpegPath here makes sure that the Transcode option can actually be supported.
This commit is contained in:
2025-03-14 07:39:20 +00:00
parent c705b63714
commit 9afa10dd2e

View File

@@ -4,6 +4,7 @@ import (
"context"
"io"
"net/url"
"os/exec"
"time"
"github.com/alexballas/go2tv/soapcalls/utils"
@@ -45,6 +46,8 @@ func NewTVPayload(o *Options) (*TVPayload, error) {
return nil, err
}
ffmpegPath, _ := exec.LookPath("ffmpeg")
return &TVPayload{
ControlURL: upnpServicesURLs.AvtransportControlURL,
EventURL: upnpServicesURLs.AvtransportEventSubURL,
@@ -61,6 +64,8 @@ func NewTVPayload(o *Options) (*TVPayload, error) {
Transcode: o.Transcode,
Seekable: o.Seek,
LogOutput: o.LogOutput,
FFmpegPath: ffmpegPath,
FFmpegSubsPath: o.Subs,
}, nil
}