downloader: correct download func to not set title to stdout
This commit is contained in:
parent
8d983de8ef
commit
766b4075dd
@ -124,17 +124,13 @@ func ytdlpDownload(
|
|||||||
ctx *DownloadCtx, downloadCtxs chan *DownloadCtx, errs chan *DownloadCtx) {
|
ctx *DownloadCtx, downloadCtxs chan *DownloadCtx, errs chan *DownloadCtx) {
|
||||||
|
|
||||||
cmd := exec.Command(YT_DLP, ctx.link)
|
cmd := exec.Command(YT_DLP, ctx.link)
|
||||||
stdout, err := cmd.Output()
|
_, err := cmd.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.err = &err
|
ctx.err = &err
|
||||||
ctx.status = JOB_STATUS_ERR
|
ctx.status = JOB_STATUS_ERR
|
||||||
errs <- ctx
|
errs <- ctx
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
title := string(stdout)
|
|
||||||
title = strings.TrimSpace(title)
|
|
||||||
ctx.title = title
|
|
||||||
|
|
||||||
downloadCtxs <- ctx
|
downloadCtxs <- ctx
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user