2022-10-15 21:54:11 +02:00
|
|
|
package get
|
2020-05-29 18:04:30 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/photoprism"
|
|
|
|
)
|
|
|
|
|
|
|
|
var onceMoments sync.Once
|
|
|
|
|
|
|
|
func initMoments() {
|
|
|
|
services.Moments = photoprism.NewMoments(Config())
|
|
|
|
}
|
|
|
|
|
|
|
|
func Moments() *photoprism.Moments {
|
|
|
|
onceMoments.Do(initMoments)
|
|
|
|
|
|
|
|
return services.Moments
|
|
|
|
}
|