photoprism/internal/service/thumbs.go
Michael Mayer fb921a4932 CLI: Generate thumbs for files in the sidecar folder #2669
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-08-31 18:53:04 +02:00

19 lines
282 B
Go

package service
import (
"sync"
"github.com/photoprism/photoprism/internal/photoprism"
)
var onceThumbs sync.Once
func initThumbs() {
services.Thumbs = photoprism.NewThumbs(Config())
}
func Thumbs() *photoprism.Thumbs {
onceThumbs.Do(initThumbs)
return services.Thumbs
}