diff options
Diffstat (limited to 'app/src/main')
4 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java index 606c79e6..42b6fce6 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -735,6 +735,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR if(downloadService == null) { return; } + downloadService.clear(); downloadService.setShufflePlayEnabled(true); context.openNowPlaying(); return; @@ -838,6 +839,8 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR if (downloadService == null) { return; } + + downloadService.clear(); downloadService.setShufflePlayEnabled(true); context.openNowPlaying(); } diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index 47ffa8d9..ae6e46ee 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -574,7 +574,6 @@ public class DownloadService extends Service { public synchronized void setShufflePlayEnabled(boolean enabled) { shufflePlay = enabled; if (shufflePlay) { - clear(); checkDownloads(); } SharedPreferences.Editor editor = Util.getPreferences(this).edit(); diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index 4989db40..fe75e248 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -225,6 +225,7 @@ public class DownloadServiceLifecycleSupport { } editor.commit(); + downloadService.clear(); downloadService.setShufflePlayEnabled(true); } else { downloadService.start(); 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 47c77cac..03ada494 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 @@ -468,6 +468,7 @@ public class RemoteControlClientLP extends RemoteControlClientBase { public void onPlayFromSearch (String query, Bundle extras) { // User just asked to playing something if("".equals(query)) { + downloadService.clear(); downloadService.setShufflePlayEnabled(true); } else { String mediaFocus = extras.getString(MediaStore.EXTRA_MEDIA_FOCUS); @@ -488,6 +489,7 @@ public class RemoteControlClientLP extends RemoteControlClientBase { editor.putString(Constants.PREFERENCES_KEY_SHUFFLE_GENRE, genre); editor.commit(); + downloadService.clear(); downloadService.setShufflePlayEnabled(true); } else { |