diff options
Diffstat (limited to 'yt')
-rw-r--r-- | yt/manager.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/yt/manager.go b/yt/manager.go deleted file mode 100644 index b9dc333..0000000 --- a/yt/manager.go +++ /dev/null @@ -1,25 +0,0 @@ -package yt - -import ( - "fmt" - "os/exec" - - "git.sr.ht/~gabrielgio/midr/db" -) - -func RunYtDlpProcess(entry *db.Entry) error { - args := []string{entry.Link} - - output_template := fmt.Sprintf("%s/%%(title)s.%%(ext)s", entry.OutputFolder) - args = append(args, "-o", output_template) - - downloaded_txt := fmt.Sprintf("%s/downloaded.txt", entry.OutputFolder) - args = append(args, "--download-archive", downloaded_txt) - - if len(entry.DateAfter) > 0 { - args = append(args, "--dateafter", entry.DateAfter) - } - - cmd := exec.Command("yt-dlp", args...) - return cmd.Run() -} |