Clean up stuff
This commit is contained in:
@@ -35,8 +35,8 @@ var (
|
|||||||
listPtr = flag.Bool("l", false, "List all available UPnP/DLNA Media Renderer models and URLs.")
|
listPtr = flag.Bool("l", false, "List all available UPnP/DLNA Media Renderer models and URLs.")
|
||||||
versionPtr = flag.Bool("version", false, "Print version.")
|
versionPtr = flag.Bool("version", false, "Print version.")
|
||||||
|
|
||||||
ErrNoCombi = errors.New("can't combine -l with other flags")
|
errNoCombi = errors.New("can't combine -l with other flags")
|
||||||
ErrFailtoList = errors.New("failed to list devices")
|
errFailtoList = errors.New("failed to list devices")
|
||||||
)
|
)
|
||||||
|
|
||||||
type dummyScreen struct {
|
type dummyScreen struct {
|
||||||
@@ -195,12 +195,12 @@ func listFlagFunction() error {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if flagsEnabled > 1 {
|
if flagsEnabled > 1 {
|
||||||
return ErrNoCombi
|
return errNoCombi
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceList, err := devices.LoadSSDPservices(1)
|
deviceList, err := devices.LoadSSDPservices(1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ErrFailtoList
|
return errFailtoList
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
@@ -37,8 +37,8 @@ var (
|
|||||||
listPtr = flag.Bool("l", false, "List all available UPnP/DLNA Media Renderer models and URLs.")
|
listPtr = flag.Bool("l", false, "List all available UPnP/DLNA Media Renderer models and URLs.")
|
||||||
versionPtr = flag.Bool("version", false, "Print version.")
|
versionPtr = flag.Bool("version", false, "Print version.")
|
||||||
|
|
||||||
ErrNoCombi = errors.New("can't combine -l with other flags")
|
errNoCombi = errors.New("can't combine -l with other flags")
|
||||||
ErrFailtoList = errors.New("failed to list devices")
|
errFailtoList = errors.New("failed to list devices")
|
||||||
)
|
)
|
||||||
|
|
||||||
type flagResults struct {
|
type flagResults struct {
|
||||||
@@ -191,12 +191,12 @@ func listFlagFunction() error {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if flagsEnabled > 1 {
|
if flagsEnabled > 1 {
|
||||||
return ErrNoCombi
|
return errNoCombi
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceList, err := devices.LoadSSDPservices(1)
|
deviceList, err := devices.LoadSSDPservices(1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ErrFailtoList
|
return errFailtoList
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
2
go.mod
2
go.mod
@@ -55,5 +55,3 @@ require (
|
|||||||
golang.org/x/text v0.21.0 // indirect
|
golang.org/x/text v0.21.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
//replace fyne.io/fyne/v2 => github.com/alexballas/fyne/v2 v2.3.2-patches2
|
|
||||||
|
@@ -35,7 +35,7 @@ func ServeTranscodedStream(w io.Writer, input interface{}, ff *exec.Cmd, ffmpegP
|
|||||||
_ = ff.Process.Kill()
|
_ = ff.Process.Kill()
|
||||||
}
|
}
|
||||||
|
|
||||||
vf := fmt.Sprintf("format=yuv420p")
|
vf := "format=yuv420p"
|
||||||
charenc, err := getCharDet(subs)
|
charenc, err := getCharDet(subs)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
vf = fmt.Sprintf("subtitles='%s':charenc=%s,format=yuv420p", subs, charenc)
|
vf = fmt.Sprintf("subtitles='%s':charenc=%s,format=yuv420p", subs, charenc)
|
||||||
|
@@ -33,7 +33,7 @@ func ServeTranscodedStream(w io.Writer, input interface{}, ff *exec.Cmd, ffmpegP
|
|||||||
_ = ff.Process.Kill()
|
_ = ff.Process.Kill()
|
||||||
}
|
}
|
||||||
|
|
||||||
vf := fmt.Sprintf("format=yuv420p")
|
vf := "format=yuv420p"
|
||||||
charenc, err := getCharDet(subs)
|
charenc, err := getCharDet(subs)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
vf = fmt.Sprintf("subtitles='%s':charenc=%s,format=yuv420p", subs, charenc)
|
vf = fmt.Sprintf("subtitles='%s':charenc=%s,format=yuv420p", subs, charenc)
|
||||||
|
Reference in New Issue
Block a user