paulijar / music

:notes: My personal sandbox for ownCloud Music development. All production-quality code is eventually pushed to https://github.com/owncloud/music
GNU Affero General Public License v3.0
0 stars 0 forks source link

Fixed playback order when playing album #1

Closed paulijar closed 8 years ago

paulijar commented 8 years ago

The playback order of tracks within an album was odd, to say the least. Tracks were being skipped over and sometimes the same track could be played many times, and all this while neither Shuffle nor Repeat was active. The problem was not visible when manually changing to next or previous track with the buttons, but only when the tracks were actually played through and the next track was started automatically.

The bug was caused by registering the same callbacks again and again for the same PlayerWrapper instance every time when the playing song changed. Hence, the $scope.next() function got called many times when the track ended.