~not/sonar

11f98a746e7c7529b8a3e446ebe85045fc417636 — b123400 1 year, 1 month ago 4a4940f
Play next song when the song is at root level
1 files changed, 8 insertions(+), 0 deletions(-)

M Sonar/Player/PlayerWindowController.m
M Sonar/Player/PlayerWindowController.m => Sonar/Player/PlayerWindowController.m +8 -0
@@ 1204,6 1204,14 @@ typedef enum : NSUInteger {
            playlist = [(Album*)parent songs];
        } else if ([parent isKindOfClass:[Playlist class]]) {
            playlist = [(Playlist*)parent songs];
        } else if (!parent) {
            NSMutableArray<Song*> *rootSongs = [NSMutableArray array];
            for (id rootItem in self.outlineViewItems) {
                if ([rootItem isKindOfClass:[Song class]]) {
                    [rootSongs addObject:rootItem];
                }
            }
            playlist = rootSongs;
        }
        if (self.isRandomMode) {
            playlist = [self shuffledPlaylist:playlist withFirstSong:song];