diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-08-30 11:44:18 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-08-30 11:44:18 -0700 |
commit | 0e21e82d49336b490c04f7f3a4628aae5e7ee4b2 (patch) | |
tree | a1ffe9de5bb6af0f926185790abccf5e9c052873 /src | |
parent | 5949caafe3d598268373ceeda8cf416dc96f6ac6 (diff) | |
download | dsub-0e21e82d49336b490c04f7f3a4628aae5e7ee4b2.tar.gz dsub-0e21e82d49336b490c04f7f3a4628aae5e7ee4b2.tar.bz2 dsub-0e21e82d49336b490c04f7f3a4628aae5e7ee4b2.zip |
Load metadata in background thread when needed
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/view/SongView.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/view/SongView.java b/src/github/daneren2005/dsub/view/SongView.java index 3106d38c..f76f4f2a 100644 --- a/src/github/daneren2005/dsub/view/SongView.java +++ b/src/github/daneren2005/dsub/view/SongView.java @@ -164,6 +164,11 @@ public class SongView extends UpdateView implements Checkable { partialFile = downloadFile.getPartialFile(); partialFileExists = partialFile.exists(); isStarred = song.isStarred(); + + // Check if needs to load metadata: check against all fields that we know are null in offline mode + if(song.getBitrate() == null && song.getDuration() == null && song.getDiscNumber() == null && isWorkDone) { + song.loadMetadata(downloadFile.getCompleteFile()); + } } @Override |