Fix starring albums. Seems I may have lost a commit?
This commit is contained in:
parent
5f38e70a2b
commit
a2e0acd6a2
|
@ -319,14 +319,14 @@ func (r albumRepository) Delete(id string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r albumRepository) Save(entity interface{}) (string, error) {
|
func (r albumRepository) Save(entity interface{}) (string, error) {
|
||||||
mf := entity.(*model.Artist)
|
album := entity.(*model.Album)
|
||||||
id, err := r.put(mf.ID, mf)
|
id, err := r.put(album.ID, album)
|
||||||
return id, err
|
return id, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r albumRepository) Update(entity interface{}, cols ...string) error {
|
func (r albumRepository) Update(entity interface{}, cols ...string) error {
|
||||||
mf := entity.(*model.Artist)
|
album := entity.(*model.Album)
|
||||||
_, err := r.put(mf.ID, mf)
|
_, err := r.put(album.ID, album)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,7 @@ const ContextMenu = ({
|
||||||
)
|
)
|
||||||
|
|
||||||
const handleToggleStar = (e) => {
|
const handleToggleStar = (e) => {
|
||||||
|
e.preventDefault()
|
||||||
toggleStarred()
|
toggleStarred()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
}
|
}
|
||||||
|
@ -188,6 +189,7 @@ const ContextMenu = ({
|
||||||
export const AlbumContextMenu = (props) => (
|
export const AlbumContextMenu = (props) => (
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
{...props}
|
{...props}
|
||||||
|
resource={'album'}
|
||||||
songQueryParams={{
|
songQueryParams={{
|
||||||
pagination: { page: 1, perPage: -1 },
|
pagination: { page: 1, perPage: -1 },
|
||||||
sort: { field: 'discNumber, trackNumber', order: 'ASC' },
|
sort: { field: 'discNumber, trackNumber', order: 'ASC' },
|
||||||
|
@ -213,6 +215,7 @@ AlbumContextMenu.defaultProps = {
|
||||||
export const ArtistContextMenu = (props) => (
|
export const ArtistContextMenu = (props) => (
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
{...props}
|
{...props}
|
||||||
|
resource={'artist'}
|
||||||
songQueryParams={{
|
songQueryParams={{
|
||||||
pagination: { page: 1, perPage: 200 },
|
pagination: { page: 1, perPage: 200 },
|
||||||
sort: { field: 'album, discNumber, trackNumber', order: 'ASC' },
|
sort: { field: 'album, discNumber, trackNumber', order: 'ASC' },
|
||||||
|
|
Loading…
Reference in New Issue