aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDaniel Bowman <daniel@danielbowman.co.uk>2018-11-24 19:03:50 +0000
committerDaniel Bowman <daniel@danielbowman.co.uk>2018-11-24 19:03:50 +0000
commitb0e78505555701084b18496e5561f92328b1c66f (patch)
treeeead9c02c3edf6a00c2772147cac2ecd9abdeb31 /app
parent0021824a74ce86ee951c91045504a99e84df46c4 (diff)
downloaddsub-b0e78505555701084b18496e5561f92328b1c66f.tar.gz
dsub-b0e78505555701084b18496e5561f92328b1c66f.tar.bz2
dsub-b0e78505555701084b18496e5561f92328b1c66f.zip
Stop current track if rated bad and empty playlist
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadService.java6
1 files changed, 4 insertions, 2 deletions
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 0fb5e9e5..e9096900 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
@@ -2806,14 +2806,16 @@ public class DownloadService extends Service {
}
public void setRating(int rating) {
final DownloadFile currentPlaying = this.currentPlaying;
- if(currentPlaying == null) {
+ if (currentPlaying == null) {
return;
}
MusicDirectory.Entry entry = currentPlaying.getSong();
// Immediately skip to the next song if down thumbed
- if(rating == 1) {
+ if (rating == 1 && size() > 1) {
next(true);
+ } else if (rating == 1 && size() == 1) {
+ stop();
}
UpdateHelper.setRating(this, entry, rating, new UpdateHelper.OnRatingChange() {