diff options
Diffstat (limited to 'src/strfsong.c')
-rw-r--r-- | src/strfsong.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/strfsong.c b/src/strfsong.c index 3f60875ea..287fcbdce 100644 --- a/src/strfsong.c +++ b/src/strfsong.c @@ -170,6 +170,22 @@ _strfsong(gchar *s, temp = song->title ? utf8_to_locale(song->title) : NULL; else if (strncmp("%album%", p, n) == 0) temp = song->album ? utf8_to_locale(song->album) : NULL; + else if (strncmp("%shortalbum%", p, n) == 0) + { + temp = song->album ? utf8_to_locale(song->album) : NULL; + if (temp) + { + gchar *temp2 = g_strndup(temp, 25); + if (strlen(temp) > 25) + { + temp2[24] = '.'; + temp2[23] = '.'; + temp2[22] = '.'; + } + g_free(temp); + temp = temp2; + } + } else if (strncmp("%track%", p, n) == 0) temp = song->track ? utf8_to_locale(song->track) : NULL; else if (strncmp("%name%", p, n) == 0) |