mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Fixes #56: no more duplicate tracks when browsing!
This commit is contained in:
parent
5314f5accb
commit
20ef64988a
1 changed files with 3 additions and 0 deletions
|
@ -224,6 +224,9 @@ class TracksController extends ApiControllerBase
|
|||
}
|
||||
|
||||
if (Input::has('songs')) {
|
||||
// DISTINCT is needed here to avoid duplicate results
|
||||
// when a track is associated with multiple show songs.
|
||||
$query->distinct();
|
||||
$query->join('show_song_track', function ($join) {
|
||||
$join->on('tracks.id', '=', 'show_song_track.track_id');
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue