mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add option to change temp dir
This commit is contained in:
parent
caeb734b2c
commit
a64981930b
2 changed files with 14 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ var (
|
|||
|
||||
downloadDirectoryFlag string
|
||||
downloadOutputFlag string
|
||||
downloadTempDirFlag string
|
||||
|
||||
downloadResolutionFlag string
|
||||
|
||||
|
|
@ -111,6 +112,10 @@ func init() {
|
|||
"\t{fps} » Frame Rate of the video\n"+
|
||||
"\t{audio} » Audio locale of the video\n"+
|
||||
"\t{subtitle} » Subtitle locale of the video")
|
||||
Cmd.Flags().StringVar(&downloadTempDirFlag,
|
||||
"temp",
|
||||
os.TempDir(),
|
||||
"Directory to store temporary files in")
|
||||
|
||||
Cmd.Flags().StringVarP(&downloadResolutionFlag,
|
||||
"resolution",
|
||||
|
|
@ -230,6 +235,8 @@ func downloadInfo(info utils.FormatInformation, file *os.File) error {
|
|||
}
|
||||
return nil
|
||||
})
|
||||
tmp, _ := os.MkdirTemp(downloadTempDirFlag, "crunchy_")
|
||||
downloader.TempDir = tmp
|
||||
if utils.HasFFmpeg() {
|
||||
downloader.FFmpegOpts = make([]string, 0)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue