From f9da0a9812992b10338c5155215d323c785e8081 Mon Sep 17 00:00:00 2001 From: Alex Ballas Date: Fri, 27 Dec 2024 16:47:08 +0200 Subject: [PATCH] Clean up stuff --- cmd/go2tv-lite/go2tv.go | 8 ++++---- cmd/go2tv/go2tv.go | 8 ++++---- go.mod | 2 -- soapcalls/utils/transcode.go | 2 +- soapcalls/utils/transcode_windows.go | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/cmd/go2tv-lite/go2tv.go b/cmd/go2tv-lite/go2tv.go index 147150f..5513e29 100644 --- a/cmd/go2tv-lite/go2tv.go +++ b/cmd/go2tv-lite/go2tv.go @@ -35,8 +35,8 @@ var ( listPtr = flag.Bool("l", false, "List all available UPnP/DLNA Media Renderer models and URLs.") versionPtr = flag.Bool("version", false, "Print version.") - ErrNoCombi = errors.New("can't combine -l with other flags") - ErrFailtoList = errors.New("failed to list devices") + errNoCombi = errors.New("can't combine -l with other flags") + errFailtoList = errors.New("failed to list devices") ) type dummyScreen struct { @@ -195,12 +195,12 @@ func listFlagFunction() error { }) if flagsEnabled > 1 { - return ErrNoCombi + return errNoCombi } deviceList, err := devices.LoadSSDPservices(1) if err != nil { - return ErrFailtoList + return errFailtoList } fmt.Println() diff --git a/cmd/go2tv/go2tv.go b/cmd/go2tv/go2tv.go index 25ab73a..21bd6cd 100644 --- a/cmd/go2tv/go2tv.go +++ b/cmd/go2tv/go2tv.go @@ -37,8 +37,8 @@ var ( listPtr = flag.Bool("l", false, "List all available UPnP/DLNA Media Renderer models and URLs.") versionPtr = flag.Bool("version", false, "Print version.") - ErrNoCombi = errors.New("can't combine -l with other flags") - ErrFailtoList = errors.New("failed to list devices") + errNoCombi = errors.New("can't combine -l with other flags") + errFailtoList = errors.New("failed to list devices") ) type flagResults struct { @@ -191,12 +191,12 @@ func listFlagFunction() error { }) if flagsEnabled > 1 { - return ErrNoCombi + return errNoCombi } deviceList, err := devices.LoadSSDPservices(1) if err != nil { - return ErrFailtoList + return errFailtoList } fmt.Println() diff --git a/go.mod b/go.mod index dbaba7b..fcb3f65 100644 --- a/go.mod +++ b/go.mod @@ -55,5 +55,3 @@ require ( golang.org/x/text v0.21.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -//replace fyne.io/fyne/v2 => github.com/alexballas/fyne/v2 v2.3.2-patches2 diff --git a/soapcalls/utils/transcode.go b/soapcalls/utils/transcode.go index 432b53a..d6fad47 100644 --- a/soapcalls/utils/transcode.go +++ b/soapcalls/utils/transcode.go @@ -35,7 +35,7 @@ func ServeTranscodedStream(w io.Writer, input interface{}, ff *exec.Cmd, ffmpegP _ = ff.Process.Kill() } - vf := fmt.Sprintf("format=yuv420p") + vf := "format=yuv420p" charenc, err := getCharDet(subs) if err == nil { vf = fmt.Sprintf("subtitles='%s':charenc=%s,format=yuv420p", subs, charenc) diff --git a/soapcalls/utils/transcode_windows.go b/soapcalls/utils/transcode_windows.go index 070dea0..88e0e0e 100644 --- a/soapcalls/utils/transcode_windows.go +++ b/soapcalls/utils/transcode_windows.go @@ -33,7 +33,7 @@ func ServeTranscodedStream(w io.Writer, input interface{}, ff *exec.Cmd, ffmpegP _ = ff.Process.Kill() } - vf := fmt.Sprintf("format=yuv420p") + vf := "format=yuv420p" charenc, err := getCharDet(subs) if err == nil { vf = fmt.Sprintf("subtitles='%s':charenc=%s,format=yuv420p", subs, charenc)