mirror of
https://github.com/pikami/tiktok-dl.git
synced 2025-02-16 17:26:19 +00:00
31 lines
516 B
Go
31 lines
516 B
Go
package workflows
|
|
|
|
import (
|
|
res "../resources"
|
|
utils "../utils"
|
|
)
|
|
|
|
// StartWorkflowByParameter - Start needed workflow by given parameter
|
|
func StartWorkflowByParameter(url string) {
|
|
|
|
// Music
|
|
if CanUseDownloadMusic(url) {
|
|
DownloadMusic(url)
|
|
return
|
|
}
|
|
|
|
// Single video
|
|
if CanUseDownloadSingleVideo(url) {
|
|
DownloadSingleVideo(url)
|
|
return
|
|
}
|
|
|
|
// Tiktok user
|
|
if CanUseDownloadUser(url) {
|
|
DownloadUser(utils.GetUsernameFromString(url))
|
|
return
|
|
}
|
|
|
|
utils.LogFatal(res.ErrorCouldNotRecogniseURL, url)
|
|
}
|