Now an archive program instead of a bulk downloader
This commit is contained in:
parent
d9b58bbade
commit
0c3104dfc8
1 changed files with 13 additions and 3 deletions
10
ytva.go
10
ytva.go
|
@ -144,10 +144,20 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
if _, err := os.Stat(path); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
log.Infof("Downloading video: %s", v.Title)
|
||||
if err := downloadVideo(v.WebpageURL, path, group); err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
} else {
|
||||
log.Error(err)
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
log.Infof("Video %s already exists, skipping", v.Title)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue