aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle37
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadService.java6
2 files changed, 23 insertions, 20 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 61c309f3..a87ba2b1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,7 +2,6 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 27
- buildToolsVersion '25.0.0'
defaultConfig {
applicationId "github.daneren2005.dsub"
@@ -27,14 +26,16 @@ android {
zipAlignEnabled true
}
}
-
+ flavorDimensions "version"
productFlavors {
floss {
// FLOSS build (no proprietary libraries)
+ dimension "version"
}
google {
// FLOSS build + Google libraries
// Adds ChromeCast support
+ dimension "version"
}
}
@@ -54,20 +55,20 @@ android {
}
dependencies {
- compile project(':Server Proxy')
- compile fileTree(include: ['*.jar'], dir: 'libs')
- compile 'com.android.support:support-v4:27.1.+'
- compile 'com.android.support:appcompat-v7:27.1.+'
- compile 'com.android.support:mediarouter-v7:27.1.+'
- compile 'com.android.support:recyclerview-v7:27.1.+'
- compile 'com.android.support:design:27.1.+'
- googleCompile 'com.google.android.gms:play-services-cast:8.1.0'
- compile 'com.sothree.slidinguppanel:library:3.0.0'
- compile 'de.hdodenhof:circleimageview:1.2.1'
- compile 'com.shehabic.droppy:Droppy:0.5.1@aar'
- compile group: 'org.fourthline.cling', name: 'cling-core', version:'2.1.1'
- compile group: 'org.fourthline.cling', name: 'cling-support', version:'2.1.1'
- compile group: 'org.eclipse.jetty', name: 'jetty-server', version:'8.1.16.v20140903'
- compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'8.1.16.v20140903'
- compile group: 'org.eclipse.jetty', name: 'jetty-client', version:'8.1.16.v20140903'
+ implementation project(path: ':ServerProxy')
+ implementation fileTree(include: ['*.jar'], dir: 'libs')
+ implementation 'com.android.support:support-v4:27.1.+'
+ implementation 'com.android.support:appcompat-v7:27.1.+'
+ implementation 'com.android.support:mediarouter-v7:27.1.+'
+ implementation 'com.android.support:recyclerview-v7:27.1.+'
+ implementation 'com.android.support:design:27.1.+'
+ googleImplementation 'com.google.android.gms:play-services-cast:8.1.0'
+ implementation 'com.sothree.slidinguppanel:library:3.0.0'
+ implementation 'de.hdodenhof:circleimageview:1.2.1'
+ implementation 'com.shehabic.droppy:Droppy:0.5.1@aar'
+ implementation group: 'org.fourthline.cling', name: 'cling-core', version:'2.1.1'
+ implementation group: 'org.fourthline.cling', name: 'cling-support', version:'2.1.1'
+ implementation group: 'org.eclipse.jetty', name: 'jetty-server', version:'8.1.16.v20140903'
+ implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version:'8.1.16.v20140903'
+ implementation group: 'org.eclipse.jetty', name: 'jetty-client', version:'8.1.16.v20140903'
}
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() {