downlad into temp folder then move to out folder when done, temp replace with my fork until upstream PR is merged
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// startAsyncDownload initiates a download in a goroutine and handles progress updates
|
||||
func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, url, videoFormatID, audioFormatID, outputDir string) {
|
||||
func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, url, videoFormatID, audioFormatID, outputDir, tempDir string) {
|
||||
progressChan := make(chan ProgressUpdate, 1)
|
||||
resultChan := make(chan DownloadResult, 1)
|
||||
|
||||
@@ -29,7 +29,7 @@ func startAsyncDownload(s *discordgo.Session, i *discordgo.InteractionCreate, ur
|
||||
}()
|
||||
|
||||
// Call DownloadVideo (it panics on error instead of returning error)
|
||||
DownloadVideo(outputDir, url, DownloadOptions{
|
||||
DownloadVideo(outputDir, tempDir, url, DownloadOptions{
|
||||
EmbedThumbnail: true,
|
||||
IncludeSubtitles: true,
|
||||
VideoFormatID: videoFormatID,
|
||||
|
||||
Reference in New Issue
Block a user