mozilla-b2g/gaia — pull request #6959 by dominickuo (2012-12-11 20:06:06+00:00)
Title: Bug 796317 - [Music] Complete all shuffle interaction

This PR is for https://bugzilla.mozilla.org/show_bug.cgi?id=796317

I have made some major changes:

1. Add advancedEnumerate() in shared/js/mediadb.js so that Music can directly get a specific song from MediaDB, and start shuffling from it. This also means that PlayerView does not need to wait for all callbacks to fill the dataSource, then start playing some songs which maybe not in dataSource yet.
2. Move shuffle logic from SubListView to PlayerView. Create shuffled list base on an index. This index could be the current playing index, or an index that users tap on. These indexes should always be the first one in the shuffled list, cause Music have to make sure playing all the other songs once in one shuffling round.
3. Now if we tap any album on mix view, Music will start to play all songs in that album. (It used to play only one song of an album then go to next album)