From 8fd32b5e279e5f9fe30e568b11164bfc6f87e3c4 Mon Sep 17 00:00:00 2001 From: mK33y <56261048+mK33y@users.noreply.github.com> Date: Sun, 4 Sep 2022 23:24:09 +0200 Subject: [PATCH] Update main.go fixed recording issue (return nil) added username into filename --- main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 2be92ff..995d429 100644 --- a/main.go +++ b/main.go @@ -122,8 +122,8 @@ func parseM3U8Source(url string) (chunks []*m3u8.MediaSegment, wait float64, err // capture captures the specified channel streaming. func capture(username string) { - // Define the video filename by current time. - filename := time.Now().Format("2006-01-02_15-04-05") + // Define the video filename by current time //04.09.22 added username into filename mKeey. + filename := username + "_" + time.Now().Format("2006-01-02_15-04-05") // Get the channel page content body. body := getBody(username) // Get the master playlist URL from extracting the channel body. @@ -283,7 +283,6 @@ func endpoint(c *cli.Context) error { log.Printf("%s is not online, check again after %d minute(s)...", c.String("username"), c.Int("interval")) <-time.After(time.Minute * time.Duration(c.Int("interval"))) } - return nil } func main() {