From 349e7cf1601e354a1ea4ff9a00c48a16b0388d6b Mon Sep 17 00:00:00 2001 From: lordwelch Date: Thu, 30 Nov 2017 20:08:54 -0700 Subject: [PATCH] Fix wget output --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index ede127d..80c61e1 100644 --- a/main.go +++ b/main.go @@ -41,7 +41,7 @@ func main() { url := strings.TrimSpace(scanner.Text()) torrentName = filepath.Base(url) torrentPath = filepath.Join(unselectedDir, torrentName) - cmd := exec.Command("wget", url, "-o", torrentPath) + cmd := exec.Command("wget", url, "-O", torrentPath) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run() @@ -62,7 +62,7 @@ func process(torrentFile string) *SceneVideoTorrent { ) f, err := os.OpenFile(torrentFile, os.O_RDONLY, 755) fmt.Println("File: ",err) - err := mt.ReadFile(f) + err = mt.ReadFile(f) fmt.Println("Read: "err) fmt.Printf("%+v\n", mt) vt.Torrent = NewTorrent(*mt)