diff options
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index edb7f2c9..791fa1c6 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -81,6 +81,8 @@ public class SubsonicFragmentActivity extends SubsonicActivity { private static String TAG = SubsonicFragmentActivity.class.getSimpleName();
private static boolean infoDialogDisplayed;
private static boolean sessionInitialized = false;
+ private static long ALLOWED_SKEW = 30000L;
+
private ScheduledExecutorService executorService;
private View bottomBar;
private View coverArtView;
@@ -564,8 +566,10 @@ 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 && remoteState.changed != null) {
+ // Check if changed + 30 seconds since some servers have slight skew
+ Date remoteChange = new Date(remoteState.changed.getTime() - ALLOWED_SKEW);
Date localChange = downloadService.getLastStateChanged();
- if(localChange == null || localChange.before(remoteState.changed)) {
+ if(localChange == null || localChange.before(remoteChange)) {
playerQueue = remoteState;
}
}
|