aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-03-12 21:23:50 -0700
committerScott Jackson <daneren2005@gmail.com>2014-03-12 21:23:50 -0700
commit4608c4cace52b72f7f3630299c6b0ab33c29cb6b (patch)
treec5668638933ba6e6cb69dcd550542c1bcfe8ef48 /src/github/daneren2005
parent9637473ce5e6a9be18ddc239a32d3e7190acd7cc (diff)
downloaddsub-4608c4cace52b72f7f3630299c6b0ab33c29cb6b.tar.gz
dsub-4608c4cace52b72f7f3630299c6b0ab33c29cb6b.tar.bz2
dsub-4608c4cace52b72f7f3630299c6b0ab33c29cb6b.zip
Fix a case of infinite download
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadFile.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java
index c7b66f8f..965a2a6f 100644
--- a/src/github/daneren2005/dsub/service/DownloadFile.java
+++ b/src/github/daneren2005/dsub/service/DownloadFile.java
@@ -408,7 +408,11 @@ public class DownloadFile implements BufferFile {
} else {
if(save) {
Util.renameFile(partialFile, saveFile);
- mediaStoreService.saveInMediaStore(DownloadFile.this);
+ try {
+ mediaStoreService.saveInMediaStore(DownloadFile.this);
+ } catch(Exception e) {
+ Log.w(TAG, "Failed to save in media store", e);
+ }
} else {
Util.renameFile(partialFile, completeFile);
}
@@ -428,6 +432,7 @@ public class DownloadFile implements BufferFile {
Util.delete(completeFile);
Util.delete(saveFile);
if (!isCancelled()) {
+ failed++;
failedDownload = true;
Log.w(TAG, "Failed to download '" + song + "'.", x);
}