Fix PlaylistTracks's loadAllGenres. Fix #2988
This commit is contained in:
parent
a8955f24e0
commit
d4a9a9e555
|
@ -74,6 +74,12 @@ func (r *playlistTrackRepository) Read(id string) (interface{}, error) {
|
||||||
return &trk, err
|
return &trk, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is a "hack" to allow loadAllGenres to work with playlist tracks. Will be removed once we have a new
|
||||||
|
// one-to-many relationship solution
|
||||||
|
func (r *playlistTrackRepository) getTableName() string {
|
||||||
|
return "media_file"
|
||||||
|
}
|
||||||
|
|
||||||
func (r *playlistTrackRepository) GetAll(options ...model.QueryOptions) (model.PlaylistTracks, error) {
|
func (r *playlistTrackRepository) GetAll(options ...model.QueryOptions) (model.PlaylistTracks, error) {
|
||||||
tracks, err := r.playlistRepo.loadTracks(r.newSelect(options...), r.playlistId)
|
tracks, err := r.playlistRepo.loadTracks(r.newSelect(options...), r.playlistId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue