Skip to content

Commit

Permalink
Fix PlaylistTracks's loadAllGenres. Fix #2988
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed May 2, 2024
1 parent a8955f2 commit d4a9a9e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions persistence/playlist_track_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ func (r *playlistTrackRepository) Read(id string) (interface{}, error) {
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) {
tracks, err := r.playlistRepo.loadTracks(r.newSelect(options...), r.playlistId)
if err != nil {
Expand Down

0 comments on commit d4a9a9e

Please sign in to comment.