Code

Merge remote branches 'jn/cosmetics', 'jn/doxygen' and 'jn/renames'
[ncmpc.git] / src / screen_song.c
index a66f3e1b7217e2d5e873eaf3b0d6c762ec273a22..22f52f4b4441233f33da4929006e2d762074a16d 100644 (file)
@@ -36,6 +36,7 @@
 
 enum {
        LABEL_LENGTH = MPD_TAG_COUNT,
+       LABEL_PATH,
        LABEL_BITRATE,
 };
 
@@ -51,6 +52,7 @@ static const char *const tag_labels[] = {
        [MPD_TAG_DATE] = N_("Date"),
        [MPD_TAG_GENRE] = N_("Genre"),
        [MPD_TAG_COMMENT] = N_("Comment"),
+       [LABEL_PATH] = N_("Path"),
        [LABEL_BITRATE] = N_("Bitrate"),
 };
 
@@ -308,10 +310,11 @@ screen_song_add_song(const struct mpd_song *song, const struct mpdclient *c)
        screen_song_append_tag(song, MPD_TAG_GENRE);
        screen_song_append_tag(song, MPD_TAG_COMMENT);
 
-       screen_song_append(_("Path"), mpd_song_get_uri(song),
+       screen_song_append(_(tag_labels[LABEL_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));