diff options
Diffstat (limited to '')
-rw-r--r-- | src/screen_file.c | 15 | ||||
-rw-r--r-- | src/strfsong.c | 16 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/screen_file.c b/src/screen_file.c index 2d8c1dea8..b2d320f0b 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -549,7 +549,20 @@ browse_close(void) static char * browse_title(char *str, size_t size) { - g_snprintf(str, size, _("Browse: %s"), basename(filelist->path)); + char *pathcopy; + char *parentdir; + pathcopy = strdup(filelist->path); + parentdir = dirname(pathcopy); + parentdir = basename(parentdir); + if( parentdir[0] == '.' && strlen(parentdir) == 1 ) + { + parentdir = NULL; + } + g_snprintf(str, size, _("Browse: %s%s%s"), + parentdir ? parentdir : "", + parentdir ? "/" : "", + basename(filelist->path)); + free(pathcopy); return str; } 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) |