aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java')
-rw-r--r--src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java b/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
index 240231ab..1de9712d 100644
--- a/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
+++ b/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
@@ -98,15 +98,16 @@ public class SubsonicSyncAdapter extends AbstractThreadedSyncAdapter {
String className = this.getClass().getSimpleName();
Log.i(TAG, "Running sync for " + className);
long start = System.currentTimeMillis();
- try {
- int servers = Util.getServerCount(context);
- for(int i = 1; i <= servers; i++) {
+ int servers = Util.getServerCount(context);
+ for(int i = 1; i <= servers; i++) {
+ try {
musicService.setInstance(i);
onExecuteSync(context, i);
+ } catch(Exception e) {
+ Log.e(TAG, "Failed sync for " + className + "(" + i + ")", e);
}
- } catch(Exception e) {
- Log.e(TAG, "Failed sync for " + className, e);
}
+
Log.i(TAG, className + " executed in " + (System.currentTimeMillis() - start) + " ms");
}
public void onExecuteSync(Context context, int instance) {