From c51fb8cc8b850b4915e083d0dd2c30d79f8b632e Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 13 Aug 2023 21:36:42 +0200 Subject: 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 :) --- pkg/database/repository/media.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'pkg/database/repository') 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 } -- cgit v1.2.3