From 8e28956d0331c980deba74e7a2356ca3d7969fc2 Mon Sep 17 00:00:00 2001 From: Adrian Ulrich Date: Sun, 17 May 2015 14:41:03 +0200 Subject: [PATCH] ensure that song is filled --- src/ch/blinkenlights/android/vanilla/RemoteControl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch/blinkenlights/android/vanilla/RemoteControl.java b/src/ch/blinkenlights/android/vanilla/RemoteControl.java index 881b87b3..2103f361 100644 --- a/src/ch/blinkenlights/android/vanilla/RemoteControl.java +++ b/src/ch/blinkenlights/android/vanilla/RemoteControl.java @@ -84,7 +84,7 @@ public class RemoteControl { remote.setPlaybackState((state & PlaybackService.FLAG_PLAYING) != 0 ? RemoteControlClient.PLAYSTATE_PLAYING : RemoteControlClient.PLAYSTATE_PAUSED); RemoteControlClient.MetadataEditor editor = remote.editMetadata(true); - if (song != null) { + if (song != null && song.id != -1) { String artist_album = song.artist + " - " + song.album; artist_album = (song.artist.length() == 0 ? song.album : artist_album); // no artist ? -> only display album artist_album = (song.album.length() == 0 ? song.artist : artist_album); // no album ? -> only display artist