diff options
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/updates/Updater.java | 10 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/updates/Updater373.java | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/updates/Updater.java b/subsonic-android/src/github/daneren2005/dsub/updates/Updater.java index a62920b9..69cdb642 100644 --- a/subsonic-android/src/github/daneren2005/dsub/updates/Updater.java +++ b/subsonic-android/src/github/daneren2005/dsub/updates/Updater.java @@ -60,10 +60,18 @@ public class Updater { }
}
+ public String getName() {
+ return this.TAG;
+ }
+
private class BackgroundUpdate extends AsyncTask<Updater, Void, Void> {
@Override
protected Void doInBackground(Updater... params) {
- params[0].update(context);
+ try {
+ params[0].update(context);
+ } catch(Exception e) {
+ Log.w(TAG, "Failed to run update for " + params[0].getName());
+ }
return null;
}
}
diff --git a/subsonic-android/src/github/daneren2005/dsub/updates/Updater373.java b/subsonic-android/src/github/daneren2005/dsub/updates/Updater373.java index 4df31580..b56c2731 100644 --- a/subsonic-android/src/github/daneren2005/dsub/updates/Updater373.java +++ b/subsonic-android/src/github/daneren2005/dsub/updates/Updater373.java @@ -29,9 +29,10 @@ import java.io.File; *
* @author Scott
*/
-public class Updater373 extends Updater {
+public class Updater373 extends Updater {
public Updater373() {
super(373);
+ TAG = Updater373.class.getSimpleName();
}
@Override
@@ -39,7 +40,9 @@ public class Updater373 extends Updater { // Rename cover.jpeg to cover.jpg
Log.i(TAG, "Running Updater373: updating cover.jpeg to cover.jpg");
File dir = FileUtil.getMusicDirectory(context);
- moveArt(dir);
+ if(dir != null) {
+ moveArt(dir);
+ }
}
private void moveArt(File dir) {
|