From: Jonathan Neuschäfer Date: Fri, 10 Aug 2012 11:21:37 +0000 (+0200) Subject: strfsong: add %albumartist%, %composer%, and %performer% X-Git-Tag: release-0.21~16 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8d06a993613f408a90be61adc88edd45e2fb2985;p=ncmpc.git strfsong: add %albumartist%, %composer%, and %performer% --- diff --git a/doc/ncmpc.1 b/doc/ncmpc.1 index b6eef5e..28f88f5 100644 --- a/doc/ncmpc.1 +++ b/doc/ncmpc.1 @@ -246,7 +246,7 @@ You can view ncmpc's key bindings by pressing '1' (help) when ncmpc is running. To edit key bindings press 'K' and use the key editor in ncmpc. .SH "SONG FORMAT" Format of song display for status and the list window. -The metadata delimiters are: %artist%, %title%, %album%, %shortalbum%, %track%, %genre%, %name%, %time%, %date%, %file%, %shortfile%. +The metadata delimiters are: %artist%, %albumartist%, %composer%, %performer%, %title%, %album%, %shortalbum%, %track%, %genre%, %name%, %time%, %date%, %file%, %shortfile%. The [] operators are used to group output such that if none of the metadata delimiters between '[' and ']' are matched, then none of the characters between '[' and ']' are output; literal text is always output. '&' and '|' are logical operators for AND and OR. '#' is used to escape characters. diff --git a/src/strfsong.c b/src/strfsong.c index 35086e8..4856767 100644 --- a/src/strfsong.c +++ b/src/strfsong.c @@ -208,6 +208,12 @@ _strfsong(gchar *s, temp = utf8_to_locale(mpd_song_get_uri(song)); else if (strncmp("%artist%", p, n) == 0) temp = song_tag_locale(song, MPD_TAG_ARTIST); + else if (strncmp("%albumartist", p, n) == 0) + temp = song_tag_locale(song, MPD_TAG_ALBUM_ARTIST); + else if (strncmp("%composer%", p, n) == 0) + temp = song_tag_locale(song, MPD_TAG_COMPOSER); + else if (strncmp("%performer%", p, n) == 0) + temp = song_tag_locale(song, MPD_TAG_PERFORMER); else if (strncmp("%title%", p, n) == 0) temp = song_tag_locale(song, MPD_TAG_TITLE); else if (strncmp("%album%", p, n) == 0)