aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-06-25 22:33:51 -0700
committerScott Jackson <daneren2005@gmail.com>2015-06-25 22:33:51 -0700
commit50841df0e09a4e280298b6a5b8478a059b631ab3 (patch)
treeeacae27b3b955a063a4a61f7c468ed55fd5e34ab /app/src/main/java
parent4de9c5147d1722f00deb0ae475b8f23464226147 (diff)
parent04bf2e345beae36a512aa50b5b920a4af9345743 (diff)
downloaddsub-50841df0e09a4e280298b6a5b8478a059b631ab3.tar.gz
dsub-50841df0e09a4e280298b6a5b8478a059b631ab3.tar.bz2
dsub-50841df0e09a4e280298b6a5b8478a059b631ab3.zip
Merge branch 'master' into SlideUpPanel2
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java1
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadService.java3
2 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java b/app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java
index f161cac6..3bc7f2a3 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/CachedMusicService.java
@@ -489,6 +489,7 @@ public class CachedMusicService implements MusicService {
FileUtil.serialize(context, dir, getCacheName(context, type, Integer.toString(offset)));
return dir;
} catch(IOException e) {
+ Log.w(TAG, "Failed to refresh album list: ", e);
MusicDirectory dir = FileUtil.deserialize(context, getCacheName(context, type, Integer.toString(offset)), MusicDirectory.class);
if(dir == null) {
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 40521051..bf68c450 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
@@ -2111,7 +2111,8 @@ public class DownloadService extends Service {
return false;
}
- int cutoffPoint = (int) (duration * DELETE_CUTOFF);
+ // Make cutoff a maximum of 10 minutes
+ int cutoffPoint = Math.min((int) (duration * DELETE_CUTOFF), 10 * 60 * 1000);
boolean isPastCutoff = duration > 0 && position > cutoffPoint;
// Check to make sure song isn't within 10 seconds of where it was created