diff options
Diffstat (limited to 'internal/gallery')
| -rw-r--r-- | internal/gallery/builder.go | 5 | ||||
| -rw-r--r-- | internal/gallery/photo.go | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/internal/gallery/builder.go b/internal/gallery/builder.go index a0c4cd6..038acb4 100644 --- a/internal/gallery/builder.go +++ b/internal/gallery/builder.go @@ -7,7 +7,7 @@ import ( "github.com/RanXom/galleryd/internal/scanner" ) -// Builder constructs gallery photos +// Builder constructs gallery photos from scanned files. type Builder struct { reader *metadata.Reader } @@ -18,6 +18,9 @@ func New(reader *metadata.Reader) *Builder { } } +// Build converts scanned files into gallery photos. +// +// Photos are sorted by capture date in descending order. func (b *Builder) Build( ctx context.Context, files []scanner.File, diff --git a/internal/gallery/photo.go b/internal/gallery/photo.go index 57678f4..73a6103 100644 --- a/internal/gallery/photo.go +++ b/internal/gallery/photo.go @@ -5,7 +5,10 @@ import ( "github.com/RanXom/galleryd/internal/scanner" ) -// Photo represents an image in the gallery +// Photo represents an image in the gallery. +// +// A Photo combines filesystem information with extracted metadata +// and a stable identifier. type Photo struct { ID string |