Add ytdlp binding lib

This commit is contained in:
2024-06-17 15:50:22 +02:00
parent 3d41e4c75e
commit 8286e578f2
4 changed files with 56 additions and 62 deletions

13
main.go
View File

@@ -48,11 +48,14 @@ func main() {
status := make(chan error)
for event := range listener.Create {
log.Printf("Create event: %+v\n", event)
go Download(event, status)
// go DownloadNative(event, status)
for status := range status {
log.Printf("Status: %s\n", status)
}
eventCopy := event
go func() {
Download(eventCopy, status)
// go DownloadNative(event, status)
for status := range status {
log.Printf("Status: %s\n", status)
}
}()
}
time.Sleep(1 * time.Hour)