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
16
ytva.go
16
ytva.go
|
@ -144,9 +144,19 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Downloading video: %s", v.Title)
|
if _, err := os.Stat(path); err != nil {
|
||||||
if err := downloadVideo(v.WebpageURL, path, group); err != nil {
|
if os.IsNotExist(err) {
|
||||||
log.Error(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