Skip to content

Commit

Permalink
Merge pull request #883 from glennguy/edge
Browse files Browse the repository at this point in the history
AA voice search improvements
  • Loading branch information
daneren2005 authored Sep 12, 2018
2 parents 1bf9423 + 6eb8fcb commit 19895fc
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ protected Void doInBackground(MusicService musicService) throws Throwable {
SearchResult results = musicService.search(searchCritera, downloadService, null);

if(results.hasArtists()) {
playFromParent(new Entry(results.getArtists().get(0)));
playFromParent(new Entry(results.getArtists().get(0)), true);
} else if(results.hasAlbums()) {
playFromParent(results.getAlbums().get(0));
playFromParent(results.getAlbums().get(0), false);
} else if(results.hasSongs()) {
playSong(results.getSongs().get(0));
} else {
Expand All @@ -327,10 +327,10 @@ protected Void doInBackground(MusicService musicService) throws Throwable {
return null;
}

private void playFromParent(Entry parent) throws Exception {
private void playFromParent(Entry parent, boolean shuffle) throws Exception {
List<Entry> songs = new ArrayList<>();
getSongsRecursively(parent, songs);
playSongs(songs);
playSongs(songs, shuffle, false, false);
}
private void getSongsRecursively(Entry parent, List<Entry> songs) throws Exception {
MusicDirectory musicDirectory;
Expand Down Expand Up @@ -421,7 +421,7 @@ protected Void doInBackground(MusicService musicService) throws Throwable {
}

private void playSong(Entry entry) {

playSong(entry, false);
}
private void playSong(Entry entry, boolean resumeFromBookmark) {
List<Entry> entries = new ArrayList<>();
Expand Down

0 comments on commit 19895fc

Please sign in to comment.