From 6eb8fcb14e96d866bbecad82a78383698ab7af0e Mon Sep 17 00:00:00 2001 From: Glenn Guy Date: Sat, 8 Sep 2018 22:57:48 +1000 Subject: AA voice search improvements Specific song requests weren't doing anything, and requests to 'play some (artist)' would queue up albums in chronological order. Single songs now working, and artist requests will shuffle which is in line with other services like spotify etc. --- .../daneren2005/dsub/util/compat/RemoteControlClientLP.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java b/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java index 9f1d5ebd..1229d024 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java +++ b/app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java @@ -315,9 +315,9 @@ public class RemoteControlClientLP extends RemoteControlClientBase { 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 { @@ -327,10 +327,10 @@ public class RemoteControlClientLP extends RemoteControlClientBase { return null; } - private void playFromParent(Entry parent) throws Exception { + private void playFromParent(Entry parent, boolean shuffle) throws Exception { List songs = new ArrayList<>(); getSongsRecursively(parent, songs); - playSongs(songs); + playSongs(songs, shuffle, false, false); } private void getSongsRecursively(Entry parent, List songs) throws Exception { MusicDirectory musicDirectory; @@ -421,7 +421,7 @@ public class RemoteControlClientLP extends RemoteControlClientBase { } private void playSong(Entry entry) { - + playSong(entry, false); } private void playSong(Entry entry, boolean resumeFromBookmark) { List entries = new ArrayList<>(); -- cgit v1.2.3