diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-05-11 17:35:58 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-05-11 17:35:58 -0700 |
commit | 7359c651f6db8ca0eba3e43415564d4a8507a087 (patch) | |
tree | 50f0fe0b350b119ffd32046df389acf395752d69 /subsonic-android | |
parent | c4209a33ff1f6faf91aed16183fac064fdba0cde (diff) | |
download | dsub-7359c651f6db8ca0eba3e43415564d4a8507a087.tar.gz dsub-7359c651f6db8ca0eba3e43415564d4a8507a087.tar.bz2 dsub-7359c651f6db8ca0eba3e43415564d4a8507a087.zip |
Closes #122 Add now playing / total in queue to download fragment
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java index dbedf5b0..8a1c1da5 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -886,23 +886,28 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe default:
break;
}
+
+ setSubtitle(context.getResources().getString(R.string.download_playing_out_of, downloadService.getCurrentPlayingIndex(), downloadService.size()));
}
private void onCurrentChanged() {
- if (getDownloadService() == null) {
+ DownloadService downloadService = getDownloadService();
+ if (downloadService == null) {
return;
}
- currentPlaying = getDownloadService().getCurrentPlaying();
+ currentPlaying = downloadService.getCurrentPlaying();
if (currentPlaying != null) {
MusicDirectory.Entry song = currentPlaying.getSong();
songTitleTextView.setText(song.getTitle());
getImageLoader().loadImage(albumArtImageView, song, true, true);
starButton.setImageResource(song.isStarred() ? android.R.drawable.btn_star_big_on : android.R.drawable.btn_star_big_off);
+ setSubtitle(context.getResources().getString(R.string.download_playing_out_of, downloadService.getCurrentPlayingIndex(), downloadService.size()));
} else {
songTitleTextView.setText(null);
getImageLoader().loadImage(albumArtImageView, null, true, false);
starButton.setImageResource(android.R.drawable.btn_star_big_off);
+ setSubtitle(null);
}
}
|