human readable video names
This commit is contained in:
parent
1c6428f1ab
commit
72039623e0
1 changed files with 2 additions and 2 deletions
|
@ -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]+`)
|
||||
|
||||
|
|
Loading…
Reference in a new issue