Fix fields not being sent on getPlaylist.view responses.
This commit is contained in:
parent
67c82f524b
commit
58218e6dc4
|
@ -345,11 +345,11 @@ func (r *playlistRepository) refreshCounters(pls *model.Playlist) error {
|
||||||
func (r *playlistRepository) loadTracks(sel SelectBuilder, id string) (model.PlaylistTracks, error) {
|
func (r *playlistRepository) loadTracks(sel SelectBuilder, id string) (model.PlaylistTracks, error) {
|
||||||
tracksQuery := sel.
|
tracksQuery := sel.
|
||||||
Columns(
|
Columns(
|
||||||
"coalesce(starred, 0)",
|
"coalesce(starred, 0) as starred",
|
||||||
"starred_at",
|
"starred_at",
|
||||||
"coalesce(play_count, 0)",
|
"coalesce(play_count, 0) as play_count",
|
||||||
"play_date",
|
"play_date",
|
||||||
"coalesce(rating, 0)",
|
"coalesce(rating, 0) as rating",
|
||||||
"f.*",
|
"f.*",
|
||||||
"playlist_tracks.*",
|
"playlist_tracks.*",
|
||||||
).
|
).
|
||||||
|
|
|
@ -51,9 +51,9 @@ func (r *playlistTrackRepository) Read(id string) (interface{}, error) {
|
||||||
" AND annotation.item_type = 'media_file'"+
|
" AND annotation.item_type = 'media_file'"+
|
||||||
" AND annotation.user_id = '"+userId(r.ctx)+"')").
|
" AND annotation.user_id = '"+userId(r.ctx)+"')").
|
||||||
Columns(
|
Columns(
|
||||||
"coalesce(starred, 0)",
|
"coalesce(starred, 0) as starred",
|
||||||
"coalesce(play_count, 0)",
|
"coalesce(play_count, 0) as play_count",
|
||||||
"coalesce(rating, 0)",
|
"coalesce(rating, 0) as rating",
|
||||||
"starred_at",
|
"starred_at",
|
||||||
"play_date",
|
"play_date",
|
||||||
"f.*",
|
"f.*",
|
||||||
|
|
Loading…
Reference in New Issue