diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index 9845411a..33adcb37 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -80,6 +80,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity { private TextView artistView;
private ImageButton startButton;
private long lastBackPressTime = 0;
+ private long currentRevision = -1;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -406,11 +407,19 @@ public class SubsonicFragmentActivity extends SubsonicActivity { }
private void update() {
- if (getDownloadService() == null) {
+ DownloadService downloadService = getDownloadService();
+ if (downloadService == null) {
return;
}
+
+ long revision = downloadService.getDownloadListUpdateRevision();
+ if(currentRevision == revision) {
+ return;
+ } else {
+ currentRevision = revision;
+ }
- DownloadFile current = getDownloadService().getCurrentPlaying();
+ DownloadFile current = downloadService.getCurrentPlaying();
if(current == null) {
trackView.setText("Title");
artistView.setText("Artist");
|