mirror of
https://github.com/pikami/tiktok-dl.git
synced 2024-11-25 09:15:41 +00:00
1b3f985f42
Added `-quiet` flag Move out error messages to separate file
29 lines
604 B
Go
29 lines
604 B
Go
package workflows
|
|
|
|
import (
|
|
res "../resources"
|
|
utils "../utils"
|
|
)
|
|
|
|
// CanUseDownloadBatchFile - Check's if DownloadBatchFile can be used
|
|
func CanUseDownloadBatchFile(batchFilePath string) bool {
|
|
return batchFilePath != ""
|
|
}
|
|
|
|
// DownloadBatchFile - Download items from batch file
|
|
func DownloadBatchFile(batchFilePath string) {
|
|
if !utils.CheckIfExists(batchFilePath) {
|
|
utils.LogFatal(res.ErrorPathNotFound, batchFilePath)
|
|
}
|
|
|
|
utils.ReadFileLineByLine(batchFilePath, downloadItem)
|
|
}
|
|
|
|
func downloadItem(batchItem string) {
|
|
if batchItem[0] == '#' {
|
|
return
|
|
}
|
|
|
|
StartWorkflowByParameter(batchItem)
|
|
}
|