Mercurial > audlegacy-plugins
changeset 1515:fc1b025e6900
Report the title properly, as in all the other plugins in the tree. Poor ignored and unloved plugin...
author | Tony Vroon <chainsaw@gentoo.org> |
---|---|
date | Wed, 22 Aug 2007 23:52:25 +0100 |
parents | a8430f6ea7a2 |
children | d1671cf98196 |
files | src/wav/wav-sndfile.c |
diffstat | 1 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/wav/wav-sndfile.c Thu Aug 23 00:02:43 2007 +0200 +++ b/src/wav/wav-sndfile.c Wed Aug 22 23:52:25 2007 +0100 @@ -303,12 +303,20 @@ static gchar *get_title(char *filename) { + Tuple *tuple; gchar *title; gchar *realfn = NULL; - realfn = g_filename_from_uri(filename, NULL, NULL); - title = g_path_get_basename(realfn ? realfn : filename); - g_free(realfn); realfn = NULL; + tuple = tuple_new_from_filename(filename); + fill_song_tuple(filename, tuple); + title = tuple_formatter_make_title_string(tuple, get_gentitle_format()); + if (*title == '\0') + { + g_free(title); + title = g_strdup(tuple_get_string(tuple, "file-name")); + } + + tuple_free(tuple); return title; } @@ -505,8 +513,8 @@ static void file_seek (InputPlayback *playback, int time) { - gulong millisecond = time * 1000; - file_mseek(playback, millisecond); + gulong millisecond = time * 1000; + file_mseek(playback, millisecond); } static void