photoprism/internal/entity/details_fixtures.go
Michael Mayer d198a056a7 People: Improve face matching performance and accuracy #22
By default, matching is now limited to unmatched faces and markers.
2021-08-29 13:26:05 +02:00

76 lines
1.6 KiB
Go

package entity
type DetailsMap map[string]Details
func (m DetailsMap) Get(name string, photoId uint) Details {
if result, ok := m[name]; ok {
result.PhotoID = photoId
return result
}
return Details{PhotoID: photoId}
}
func (m DetailsMap) Pointer(name string, photoId uint) *Details {
if result, ok := m[name]; ok {
result.PhotoID = photoId
return &result
}
return &Details{PhotoID: photoId}
}
var DetailsFixtures = DetailsMap{
"lake": {
PhotoID: 1000000,
Keywords: "nature, frog",
Notes: "notes",
Subject: "Lake",
Artist: "Hans",
Copyright: "copy",
License: "MIT",
CreatedAt: TimeStamp(),
UpdatedAt: TimeStamp(),
KeywordsSrc: "meta",
NotesSrc: "manual",
SubjectSrc: "meta",
ArtistSrc: "meta",
CopyrightSrc: "manual",
LicenseSrc: "manual",
},
"blacklist": {
PhotoID: 1000001,
Keywords: "screenshot, info",
Notes: "notes",
Subject: "Blacklist",
Artist: "Hans",
Copyright: "copy",
License: "MIT",
CreatedAt: TimeStamp(),
UpdatedAt: TimeStamp(),
KeywordsSrc: "",
NotesSrc: "",
SubjectSrc: "meta",
ArtistSrc: "meta",
CopyrightSrc: "manual",
LicenseSrc: "manual",
},
"bridge": {
PhotoID: 1000003,
Keywords: "bridge, nature",
Notes: "Some Notes!@#$",
Subject: "Bridge",
Artist: "Jens Mander",
Copyright: "Copyright 2020",
License: "n/a",
CreatedAt: TimeStamp(),
UpdatedAt: TimeStamp(),
KeywordsSrc: "meta",
NotesSrc: "manual",
SubjectSrc: "meta",
ArtistSrc: "meta",
CopyrightSrc: "manual",
LicenseSrc: "manual",
},
}