Skip to content

Commit

Permalink
fix(): incorrect naming when downloading series videos
Browse files Browse the repository at this point in the history
fix(): incorrect naming when downloading series videos
  • Loading branch information
yliu7949 authored Jul 25, 2023
2 parents dafac22 + 2e47564 commit 2bca274
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions video/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ func (v *Video) DownloadSingleVideo(quality string) {
title = reg.ReplaceAllString(v.title, "")

if v.VidPrefix {
v.filename += v.Vid + "_"
v.filename = v.Vid + "_" + title + "_" + v.videoQuality
} else {
v.filename = title + "_" + v.videoQuality
}
v.filename += title + "_" + v.videoQuality

//若mp4文件已存在,说明该视频已下载完成。自动跳过该视频的下载。
if _, err := os.Stat(v.SaveDir + v.filename + ".mp4"); err == nil {
Expand Down

0 comments on commit 2bca274

Please sign in to comment.