diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-07-18 15:10:33 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-07-18 15:10:33 -0700 |
commit | 94717e221c794738c8b0cedcaa5f595e54c7508b (patch) | |
tree | 46d8bfd725ab81cfe504b4ea17cfe90eecf84989 /subsonic-android | |
parent | 901b1de165a5f1dfeb6a519fbcb0d7edeca4a861 (diff) | |
download | dsub-94717e221c794738c8b0cedcaa5f595e54c7508b.tar.gz dsub-94717e221c794738c8b0cedcaa5f595e54c7508b.tar.bz2 dsub-94717e221c794738c8b0cedcaa5f595e54c7508b.zip |
Fix date not always being a valid field for podcasts
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/view/SongView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/view/SongView.java b/subsonic-android/src/github/daneren2005/dsub/view/SongView.java index 7c7f5ae6..0d4489da 100644 --- a/subsonic-android/src/github/daneren2005/dsub/view/SongView.java +++ b/subsonic-android/src/github/daneren2005/dsub/view/SongView.java @@ -90,8 +90,10 @@ public class SongView extends UpdateView implements Checkable { if(!song.isVideo()) { if(song instanceof PodcastEpisode) { String date = ((PodcastEpisode)song).getDate(); - int index = date.indexOf(" "); - artist.append(date.substring(0, index != -1 ? index : date.length())); + if(date != null) { + int index = date.indexOf(" "); + artist.append(date.substring(0, index != -1 ? index : date.length())); + } } else if(song.getArtist() != null) { artist.append(song.getArtist()); |