When starting playback, start shuffle at selection
If starting playback from a given playlist entry, or selection, then start shuffle mode from that track. Otherwise, start shuffle from the beginning of the shuffle list. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
b6330279ce
commit
9a2ac6ae5a
|
@ -140,7 +140,12 @@ NSString *CogPlaybackDidStopNotficiation = @"CogPlaybackDidStopNotficiation";
|
|||
|
||||
- (IBAction)play:(id)sender {
|
||||
if([playlistController shuffle] != ShuffleOff) {
|
||||
PlaylistEntry *pe = [playlistController shuffledEntryAtIndex:0];
|
||||
PlaylistEntry *pe = nil;
|
||||
|
||||
NSInteger index = [playlistView selectedRow];
|
||||
if(index != -1) pe = [playlistController entryAtIndex:index];
|
||||
|
||||
pe = [playlistController shuffledEntryAtIndex:(pe ? pe.shuffleIndex : 0)];
|
||||
[self playEntryAtIndex:pe.index];
|
||||
} else {
|
||||
if([playlistView selectedRow] == -1)
|
||||
|
|
Loading…
Reference in New Issue