did things

This commit is contained in:
TJ Horner
2019-03-13 13:10:05 -07:00
parent 96aee306b5
commit 375a5ad681
2 changed files with 30 additions and 34 deletions

View File

@ -5,7 +5,6 @@ import (
"io/ioutil"
"path"
"strconv"
"strings"
"sync"
"time"
@ -78,10 +77,7 @@ func work(wn int, posts []e621.Post, directory string, completed *int, successes
}
func getSavePath(post *e621.Post, directory *string) string {
pathSliced := strings.Split(post.FileURL, ".")
extension := pathSliced[len(pathSliced)-1]
savePath := path.Join(*directory, strconv.Itoa(post.ID)+"."+extension)
savePath := path.Join(*directory, strconv.Itoa(post.ID)+"."+post.FileExt)
return savePath
}