Add songs to playlists with drag and drop

This commit is contained in:
Deluan 2021-10-01 10:37:05 -04:00
parent 2ab4647420
commit 6c3e45de41
14 changed files with 392 additions and 94 deletions

View file

@ -38,7 +38,13 @@ type Album struct {
UpdatedAt time.Time `structs:"updated_at" json:"updatedAt"`
}
type Albums []Album
type (
Albums []Album
DiscID struct {
AlbumID string `json:"albumId"`
DiscNumber int `json:"discNumber"`
}
)
type AlbumRepository interface {
CountAll(...QueryOptions) (int64, error)

View file

@ -44,7 +44,10 @@ type PlaylistTracks []PlaylistTrack
type PlaylistTrackRepository interface {
ResourceRepository
Add(mediaFileIds []string) error
Add(mediaFileIds []string) (int, error)
AddAlbums(albumIds []string) (int, error)
AddArtists(artistIds []string) (int, error)
AddDiscs(discs []DiscID) (int, error)
Update(mediaFileIds []string) error
Delete(id string) error
Reorder(pos int, newPos int) error