aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-01-25 09:34:15 -0800
committerScott Jackson <daneren2005@gmail.com>2014-01-25 09:34:15 -0800
commit7c085eef1c873eb167ccaec8150574d972de7d23 (patch)
tree2a52598dae256c33acd5e46569b949f8b00866fc /src
parent94ca7a4ddfc5aa663df3ed8483f1fd498c5a166a (diff)
downloaddsub-7c085eef1c873eb167ccaec8150574d972de7d23.tar.gz
dsub-7c085eef1c873eb167ccaec8150574d972de7d23.tar.bz2
dsub-7c085eef1c873eb167ccaec8150574d972de7d23.zip
Add year to albums
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/view/AlbumView.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/view/AlbumView.java b/src/github/daneren2005/dsub/view/AlbumView.java
index 5083ef0b..3d0eb382 100644
--- a/src/github/daneren2005/dsub/view/AlbumView.java
+++ b/src/github/daneren2005/dsub/view/AlbumView.java
@@ -71,7 +71,14 @@ public class AlbumView extends UpdateView {
protected void setObjectImpl(Object obj1, Object obj2) {
this.album = (MusicDirectory.Entry) obj1;
titleView.setText(album.getTitle());
- artistView.setText(album.getArtist());
+ String artist = album.getArtist();
+ if(artist == null) {
+ artist = "";
+ }
+ if(album.getYear() != null) {
+ artist += " - " + album.getYear();
+ }
+ artistView.setText(artist);
artistView.setVisibility(album.getArtist() == null ? View.GONE : View.VISIBLE);
((ImageLoader)obj2).loadImage(coverArtView, album, false, true);
file = null;