From 3efbb9d46446dfe7f607397ceda10d3a24341699 Mon Sep 17 00:00:00 2001 From: marcobaobao Date: Wed, 27 Sep 2023 13:09:13 +0200 Subject: [PATCH] code refactoring --- server/internal/playlist.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/internal/playlist.go b/server/internal/playlist.go index 9d58cfc..0b98f37 100644 --- a/server/internal/playlist.go +++ b/server/internal/playlist.go @@ -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 {