Merge branch 'dev-0.1.51' into 'master'

0.1.51

See merge request goscrobble/goscrobble-api!9
This commit is contained in:
Daniel Mason 2022-01-08 09:42:22 +00:00
commit 9bfb9358df
4 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,7 @@ stages:
- build - build
variables: variables:
VERSION: 0.1.4 VERSION: 0.1.51
build-go: build-go:
image: golang:1.17 image: golang:1.17

View File

@ -1,3 +1,6 @@
# 0.1.51
- Fixed image resize to maintain aspect ratio
# 0.1.5 # 0.1.5
- Add image upload endpoints for artist/albums @ v1/albums/{uuid}/upload - Add image upload endpoints for artist/albums @ v1/albums/{uuid}/upload

View File

@ -114,7 +114,7 @@ func resizeImage(uuid string, size int) bool {
} }
// Resize image to specified size // Resize image to specified size
resizedImage := imaging.Resize(src, size, size, imaging.Lanczos) resizedImage := imaging.Resize(src, size, 0, imaging.Lanczos)
// Save resized image // Save resized image
err = imaging.Save(resizedImage, DataDirectory+string(os.PathSeparator)+"img"+string(os.PathSeparator)+uuid+"_300px.jpg") err = imaging.Save(resizedImage, DataDirectory+string(os.PathSeparator)+"img"+string(os.PathSeparator)+uuid+"_300px.jpg")

View File

@ -825,7 +825,7 @@ func getServerInfo(w http.ResponseWriter, r *http.Request) {
} }
info := ServerInfo{ info := ServerInfo{
Version: "0.1.4", Version: "0.1.51",
RegistrationEnabled: registrationEnabled, RegistrationEnabled: registrationEnabled,
} }