Sort images in galleries by path (#855)

This commit is contained in:
InfiniteTF 2020-10-16 01:56:24 +02:00 committed by GitHub
parent 73eb5c7a1f
commit 528b32d1b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -222,7 +222,7 @@ func (qb *ImageQueryBuilder) FindByStudioID(studioID int) ([]*Image, error) {
func (qb *ImageQueryBuilder) FindByGalleryID(galleryID int) ([]*Image, error) {
args := []interface{}{galleryID}
return qb.queryImages(imagesForGalleryQuery, args, nil)
return qb.queryImages(imagesForGalleryQuery+qb.getImageSort(nil), args, nil)
}
func (qb *ImageQueryBuilder) CountByGalleryID(galleryID int) (int, error) {