From 7f584c2a084ad6965d6c674470a99778f99defe3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Sat, 19 Nov 2011 02:33:43 +0100 Subject: [PATCH] screen_song: don't show unknown kbit rates (calling mpd_status_get_kbit_rate twice in a row shouldn't impact performance, it's declared as "pure") --- src/screen_song.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/screen_song.c b/src/screen_song.c index e738fc2..9154f9a 100644 --- a/src/screen_song.c +++ b/src/screen_song.c @@ -311,7 +311,8 @@ screen_song_add_song(const struct mpd_song *song, const struct mpdclient *c) screen_song_append(_("Path"), mpd_song_get_uri(song), max_tag_label_width); if (mpdclient_is_playing(c) && c->song != NULL && - strcmp(mpd_song_get_uri(c->song), mpd_song_get_uri(song)) == 0) { + strcmp(mpd_song_get_uri(c->song), mpd_song_get_uri(song)) == 0 && + mpd_status_get_kbit_rate(c->status)) { char buf[16]; g_snprintf(buf, sizeof(buf), _("%d kbps"), mpd_status_get_kbit_rate(c->status)); -- 2.30.2