aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java')
-rw-r--r--src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
index 54db1b91..7f267f28 100644
--- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
+++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
@@ -563,9 +563,9 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
}
// If we had a remote state and it's changed is more recent than our existing state
- if(remoteState != null) {
+ if(remoteState != null && remoteState.changed != null) {
Date localChange = downloadService.getLastStateChanged();
- if(localChange == null || localChange.after(remoteState.changed)) {
+ if(localChange == null || localChange.before(remoteState.changed)) {
playerQueue = remoteState;
}
}
@@ -598,6 +598,18 @@ public class SubsonicFragmentActivity extends SubsonicActivity {
}
}.execute();
}
+ }, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ new SilentBackgroundTask<Void>(SubsonicFragmentActivity.this) {
+ @Override
+ protected Void doInBackground() throws Throwable {
+ DownloadService downloadService = getDownloadService();
+ downloadService.serializeQueue(false);
+ return null;
+ }
+ }.execute();
+ }
});
}