Fix PlaylistTracks's loadAllGenres. Fix #2988

This commit is contained in:
Deluan 2024-05-01 20:17:42 -04:00
parent a8955f24e0
commit d4a9a9e555
1 changed files with 6 additions and 0 deletions

View File

@ -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 {