aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorGlenn Guy <glennguy83@gmail.com>2018-09-08 22:57:48 +1000
committerGlenn Guy <glennguy83@gmail.com>2018-09-08 22:57:48 +1000
commit6eb8fcb14e96d866bbecad82a78383698ab7af0e (patch)
tree2a629bb8bf678f49983aa41819f54f5a9f946bd6 /app/src/main/java
parentc29e5293b38f91c67665b71c7da1f4248f1c316c (diff)
downloaddsub-6eb8fcb14e96d866bbecad82a78383698ab7af0e.tar.gz
dsub-6eb8fcb14e96d866bbecad82a78383698ab7af0e.tar.bz2
dsub-6eb8fcb14e96d866bbecad82a78383698ab7af0e.zip
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.
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/compat/RemoteControlClientLP.java10
1 files changed, 5 insertions, 5 deletions
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<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;
@@ -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<Entry> entries = new ArrayList<>();