diff --git a/sources/youtubeVideo.go b/sources/youtubeVideo.go index 15c87a2..8004357 100644 --- a/sources/youtubeVideo.go +++ b/sources/youtubeVideo.go @@ -59,10 +59,10 @@ func (v YoutubeVideo) PublishedAt() time.Time { } func (v YoutubeVideo) getFilename() string { - return v.dir + "/" + v.id + ".mp4" + return v.dir + "/" + v.getClaimName() + ".mp4" } -func (v YoutubeVideo) getClaimName(attempt int) string { +func (v YoutubeVideo) getClaimName() string { maxLen := 40 reg := regexp.MustCompile(`[^a-zA-Z0-9]+`)