Start playback on first shuffle item in shuffle
When in shuffle mode, start playback on the first item in the shuffle list, rather than the selection, or the start of the playlist. Fixes #241 Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
b63a076e21
commit
b6330279ce
|
@ -139,11 +139,16 @@ NSString *CogPlaybackDidStopNotficiation = @"CogPlaybackDidStopNotficiation";
|
|||
}
|
||||
|
||||
- (IBAction)play:(id)sender {
|
||||
if([playlistView selectedRow] == -1)
|
||||
[playlistView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
|
||||
if([playlistController shuffle] != ShuffleOff) {
|
||||
PlaylistEntry *pe = [playlistController shuffledEntryAtIndex:0];
|
||||
[self playEntryAtIndex:pe.index];
|
||||
} else {
|
||||
if([playlistView selectedRow] == -1)
|
||||
[playlistView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
|
||||
|
||||
if([playlistView selectedRow] > -1)
|
||||
[self playEntryAtIndex:(int)[playlistView selectedRow]];
|
||||
if([playlistView selectedRow] > -1)
|
||||
[self playEntryAtIndex:(int)[playlistView selectedRow]];
|
||||
}
|
||||
}
|
||||
|
||||
NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
||||
|
|
Loading…
Reference in New Issue