aboutsummaryrefslogtreecommitdiff
path: root/pkg/database/repository
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-08-13 21:36:42 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-08-13 21:36:42 +0200
commitc51fb8cc8b850b4915e083d0dd2c30d79f8b632e (patch)
tree527ba9e4f897bc2faf997ff648aeb85cc9c247eb /pkg/database/repository
parentf99f2bc94808d784c92ec4e58c660a8be3ed7fce (diff)
downloadlens-c51fb8cc8b850b4915e083d0dd2c30d79f8b632e.tar.gz
lens-c51fb8cc8b850b4915e083d0dd2c30d79f8b632e.tar.bz2
lens-c51fb8cc8b850b4915e083d0dd2c30d79f8b632e.zip
feat: Add (yet again) crude album implementation
This is a initial UI album implementation. This should cover the most basic album navigation. This is still plenty to do :)
Diffstat (limited to 'pkg/database/repository')
-rw-r--r--pkg/database/repository/media.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkg/database/repository/media.go b/pkg/database/repository/media.go
index d6addbf..9915c90 100644
--- a/pkg/database/repository/media.go
+++ b/pkg/database/repository/media.go
@@ -35,7 +35,9 @@ type (
}
Album struct {
- ID uint
+ ID uint
+ Name string
+ Path string
}
MediaThumbnail struct {
@@ -43,9 +45,10 @@ type (
}
Pagination struct {
- Page int
- Size int
- Path string
+ Page int
+ Size int
+ AlbumID *uint
+ Path string
}
CreateMedia struct {
@@ -83,8 +86,10 @@ type (
CreateThumbnail(context.Context, uint, *MediaThumbnail) error
ListEmptyAlbums(context.Context, *Pagination) ([]*Media, error)
+ ListAlbums(context.Context, uint) ([]*Album, error)
ExistsAlbumByAbsolutePath(context.Context, string) (bool, error)
GetAlbumByAbsolutePath(context.Context, string) (*Album, error)
+ GetAlbum(context.Context, uint) (*Album, error)
CreateAlbum(context.Context, *CreateAlbum) (*Album, error)
CreateAlbumFile(context.Context, *CreateAlbumFile) error
}