diff --git a/parser.go b/parser.go index a491688..e09ad60 100644 --- a/parser.go +++ b/parser.go @@ -87,7 +87,7 @@ func runCmd(cmd *exec.Cmd) (string, error) { combinedErrStr := fmt.Sprintf("%s\n%s\n%s", err.Error(), outStr, errStr) return "", errors.New(combinedErrStr) } - return strings.TrimSpace(outStr), nil + return outStr, nil } func getLink(vidurl string, debug debugT, links *linksCache, extractor extractorF) (string, error) { diff --git a/streamer.go b/streamer.go index aaf6ff2..5d77839 100644 --- a/streamer.go +++ b/streamer.go @@ -20,14 +20,12 @@ func main() { var enableDebug bool var portInt uint var errorVideoPath string - var youtubedl bool var customdl string flag.BoolVar(&version, "version", false, "prints current yt-proxy version") flag.BoolVar(&enableDebug, "debug", false, "turn on debug") flag.UintVar(&portInt, "port", 8080, "listen port") flag.StringVar(&errorVideoPath, "error-video", "corrupted.mp4", "file that will be shown on errors") - flag.BoolVar(&youtubedl, "youtube-dl", true, "use youtube-dl as url extractor") - flag.StringVar(&customdl, "custom-extractor", "", "use custom url extractor") + flag.StringVar(&customdl, "custom-extractor", "", "use custom url extractor, will be called like this: program_name url video_height video_format") flag.Parse() if version { fmt.Println(appVersion)