Mercurial > audlegacy-plugins
changeset 1413:4731d28ea19d
Fix tuple report. (null)/filename.wav wasn't so great.
author | Christian Birchinger <joker@netswarm.net> |
---|---|
date | Mon, 06 Aug 2007 03:20:01 +0200 |
parents | 6a424e6ff59c |
children | 5f892afeb8e1 |
files | src/wav/wav-sndfile.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/wav/wav-sndfile.c Mon Aug 06 01:37:26 2007 +0100 +++ b/src/wav/wav-sndfile.c Mon Aug 06 03:20:01 2007 +0200 @@ -331,10 +331,15 @@ static TitleInput* get_song_tuple (gchar *filename) { + gchar *realfn = NULL; TitleInput *tuple = bmp_title_input_new(); - tuple->file_name = g_strdup(basename(filename)); + + realfn = g_filename_from_uri(filename, NULL, NULL); + tuple->file_name = g_path_get_basename(realfn ? realfn : filename); + tuple->file_path = g_path_get_dirname(realfn ? realfn : filename); tuple->length = get_song_length(filename); - tuple->track_name = get_title(filename); + g_free(realfn); realfn = NULL; + return tuple; }