resuse the message queue for livestream downloading

This commit is contained in:
2024-08-23 18:52:13 +02:00
parent fceb36c723
commit 54771b2d78
6 changed files with 45 additions and 64 deletions

View File

@@ -5,6 +5,7 @@ import (
"time"
"github.com/marcopeocchi/yt-dlp-web-ui/server/config"
"github.com/marcopeocchi/yt-dlp-web-ui/server/internal"
)
func setupTest() {
@@ -15,9 +16,8 @@ func TestLivestream(t *testing.T) {
setupTest()
done := make(chan *LiveStream)
log := make(chan []byte)
ls := New("https://www.youtube.com/watch?v=LSm1daKezcE", log, done)
ls := New("https://www.youtube.com/watch?v=LSm1daKezcE", done, &internal.MessageQueue{}, &internal.MemoryDB{})
go ls.Start()
time.AfterFunc(time.Second*20, func() {