From 5f826d016d459f7a1a2ba26fa4c370c6e8c995ed Mon Sep 17 00:00:00 2001 From: garder500 Date: Wed, 6 Dec 2023 00:16:17 +0100 Subject: [PATCH] Just minor update --- routes/download.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/routes/download.go b/routes/download.go index 7935aea..ad714c7 100644 --- a/routes/download.go +++ b/routes/download.go @@ -10,7 +10,6 @@ import ( "os" "os/exec" "strconv" - "strings" ) func DownloadHandler(w http.ResponseWriter, r *http.Request, id, ep string, cache *functions.Cache) { @@ -81,12 +80,9 @@ func downloadEpisode(episode EpisodeJson, cache *functions.Cache) (string, error scanner := bufio.NewScanner(stderr) cache.Set(episodeName, "downloading") for scanner.Scan() { - m := scanner.Text() - if strings.Contains(m, "kbits/s speed=") { - cache.Set(episodeName, episodeName+".mp4") - fmt.Println("Downloaded " + episodeName) - } } + cache.Set(episodeName, episodeName+".mp4") + fmt.Println("Downloaded " + episodeName) if err := cmd.Wait(); err != nil { return "", err }