# HG changeset patch # User nenolod # Date 1130988694 28800 # Node ID 04d4827ea8a47be0f90e2ceadda3d0b2485f5737 # Parent 948027ac55be2f12ff7fd511ef254ac1312178ef [svn] Generate a proper title. diff -r 948027ac55be -r 04d4827ea8a4 Plugins/Input/console/Audacious_Driver.cpp --- a/Plugins/Input/console/Audacious_Driver.cpp Wed Nov 02 19:11:24 2005 -0800 +++ b/Plugins/Input/console/Audacious_Driver.cpp Wed Nov 02 19:31:34 2005 -0800 @@ -63,9 +63,26 @@ reader.open(filename); reader.read(&header, sizeof(header)); - title = g_strdup(header.song); + if (header.song) + { + TitleInput *tinput; + + tinput = bmp_title_input_new(); + + tinput->performer = g_strdup(header.author); + tinput->album_name = g_strdup(header.game); + tinput->track_name = g_strdup(header.song); - printf("song title is: %s\n", title); + tinput->file_name = g_path_get_basename(filename); + tinput->file_path = g_path_get_dirname(filename); + + title = xmms_get_titlestring(xmms_get_gentitle_format(), + tinput); + + g_free(tinput); + } + else + title = g_strdup(filename); return title; } @@ -74,8 +91,6 @@ { (*title) = get_title(filename); (*length) = -1; - - printf("get_song_info() finished\n"); } static void play_file(char *filename) @@ -126,7 +141,7 @@ NULL, NULL, NULL, - NULL, + get_song_info, NULL, NULL };