human readable video names
This commit is contained in:
parent
e976cd0fa0
commit
623a5971d9
1 changed files with 2 additions and 2 deletions
|
@ -59,10 +59,10 @@ func (v YoutubeVideo) PublishedAt() time.Time {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v YoutubeVideo) getFilename() string {
|
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
|
maxLen := 40
|
||||||
reg := regexp.MustCompile(`[^a-zA-Z0-9]+`)
|
reg := regexp.MustCompile(`[^a-zA-Z0-9]+`)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue