diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-09-05 15:37:33 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-09-05 15:37:33 -0700 |
commit | 54092d4c42a9e7444c6261009ba56c5ec638c087 (patch) | |
tree | 74d923682472804e6dbb468cfca93e58da786c73 /src | |
parent | 8c6955e69f6b982b3da8e83419e389b490ee5b01 (diff) | |
download | dsub-54092d4c42a9e7444c6261009ba56c5ec638c087.tar.gz dsub-54092d4c42a9e7444c6261009ba56c5ec638c087.tar.bz2 dsub-54092d4c42a9e7444c6261009ba56c5ec638c087.zip |
#148 Allow SongView to lock in to a static DownloadFile
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/view/SongView.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/view/SongView.java b/src/github/daneren2005/dsub/view/SongView.java index 8d986090..5ce3f5ec 100644 --- a/src/github/daneren2005/dsub/view/SongView.java +++ b/src/github/daneren2005/dsub/view/SongView.java @@ -55,6 +55,7 @@ public class SongView extends UpdateView implements Checkable { private DownloadService downloadService; private long revision = -1; private DownloadFile downloadFile; + private boolean dontChangeDownloadFile = false; private boolean playing = false; private boolean rightImage = false; @@ -152,7 +153,13 @@ public class SongView extends UpdateView implements Checkable { revision = -1; loaded = false; - } + dontChangeDownloadFile = false; + } + + public void setDownloadFile(DownloadFile downloadFile) { + this.downloadFile = downloadFile; + dontChangeDownloadFile = true; + } @Override protected void updateBackground() { @@ -164,7 +171,7 @@ public class SongView extends UpdateView implements Checkable { } long newRevision = downloadService.getDownloadListUpdateRevision(); - if(revision != newRevision || downloadFile == null) { + if((revision != newRevision && dontChangeDownloadFile == false) || downloadFile == null) { downloadFile = downloadService.forSong(song); revision = newRevision; } |