From 53e0b7c47bcd1355515bd927250da0c1e2c157af Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Fri, 25 Sep 2020 21:44:14 +0200 Subject: [PATCH] fix bug that messes with counts --- downloader/downloader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/downloader/downloader.go b/downloader/downloader.go index 404bab6..5b589c5 100644 --- a/downloader/downloader.go +++ b/downloader/downloader.go @@ -29,13 +29,13 @@ func GetPlaylistVideoIDs(channelName string, maxVideos int, stopChan stop.Chan, if err != nil { return nil, errors.Err(err) } - videoIDs := make([]string, maxVideos) + videoIDs := make([]string, 0, maxVideos) for i, v := range ids { logrus.Debugf("%d - video id %s", i, v) if i >= maxVideos { break } - videoIDs[i] = v + videoIDs = append(videoIDs, v) } return videoIDs, nil }