photoprism/internal/search/albums_photos.go

19 lines
416 B
Go
Raw Normal View History

package search
import (
"github.com/photoprism/photoprism/internal/entity"
"github.com/photoprism/photoprism/internal/form"
)
// AlbumPhotos returns up to count photos from an album.
func AlbumPhotos(a entity.Album, count int) (results PhotoResults, err error) {
results, _, err = Photos(form.PhotoSearch{
Album: a.AlbumUID,
Filter: a.AlbumFilter,
Count: count,
Offset: 0,
})
return results, err
}