ensure that song is filled

This commit is contained in:
Adrian Ulrich 2015-05-17 14:41:03 +02:00
parent 3b7af2b5bf
commit 8e28956d03

View File

@ -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