code refactoring

This commit is contained in:
2023-09-27 13:09:13 +02:00
parent fa4ba8a211
commit 3efbb9d464

View File

@@ -8,6 +8,7 @@ import (
"github.com/goccy/go-json"
"github.com/marcopeocchi/yt-dlp-web-ui/server/cli"
"github.com/marcopeocchi/yt-dlp-web-ui/server/config"
)
type metadata struct {
@@ -17,7 +18,7 @@ type metadata struct {
}
func PlaylistDetect(req DownloadRequest, mq *MessageQueue, db *MemoryDB) error {
cmd := exec.Command(cfg.GetConfig().DownloaderPath, req.URL, "-J")
cmd := exec.Command(config.Instance().GetConfig().DownloaderPath, req.URL, "-J")
stdout, err := cmd.StdoutPipe()
if err != nil {