Mercurial > audlegacy-plugins
changeset 1166:4bd7e72a6605 trunk
[svn] - handle metadata in better way.
author | yaz |
---|---|
date | Wed, 06 Jun 2007 22:58:18 -0700 |
parents | 5f3b30860b48 |
children | f22b4eb572fb |
files | ChangeLog src/tta/libtta.c |
diffstat | 2 files changed, 30 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jun 06 22:34:54 2007 -0700 +++ b/ChangeLog Wed Jun 06 22:58:18 2007 -0700 @@ -1,3 +1,12 @@ +2007-06-07 05:34:54 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> + revision [2496] + - add playback->playing code. + - if tta file doesn't have metadata, file name will be used as the title. + + trunk/src/tta/libtta.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + + 2007-06-07 04:44:52 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> revision [2494] - make wma plugin work again.
--- a/src/tta/libtta.c Wed Jun 06 22:34:54 2007 -0700 +++ b/src/tta/libtta.c Wed Jun 06 22:58:18 2007 -0700 @@ -178,12 +178,7 @@ static gchar * get_song_title(TitleInput *tuple) { - gchar *title = xmms_get_titlestring(xmms_get_gentitle_format(), tuple); - if(!title || !strcmp(title, "")) { - g_free(title); - title = g_strdup(tuple->file_name); - } - return title; + return xmms_get_titlestring(xmms_get_gentitle_format(), tuple); } static void @@ -581,13 +576,26 @@ tuple->length = ttainfo->LENGTH * 1000; if (ttainfo->ID3.id3has) { - if(ttainfo->ID3.artist) tuple->performer = g_strdup(ttainfo->ID3.artist); - if(ttainfo->ID3.album) tuple->album_name = g_strdup(ttainfo->ID3.album); - if(ttainfo->ID3.title) tuple->track_name = g_strdup(ttainfo->ID3.title); - if(ttainfo->ID3.year) tuple->year = atoi(ttainfo->ID3.year); - if(ttainfo->ID3.track) tuple->track_number = atoi(ttainfo->ID3.track); - if(ttainfo->ID3.genre) tuple->genre = g_strdup(ttainfo->ID3.genre); - if(ttainfo->ID3.comment) tuple->comment = g_strdup(ttainfo->ID3.comment); + if(ttainfo->ID3.artist && strlen(ttainfo->ID3.artist)) + tuple->performer = g_strdup(ttainfo->ID3.artist); + + if(ttainfo->ID3.album && strlen(ttainfo->ID3.album)) + tuple->album_name = g_strdup(ttainfo->ID3.album); + + if(ttainfo->ID3.title && strlen(ttainfo->ID3.title)) + tuple->track_name = g_strdup(ttainfo->ID3.title); + + if(ttainfo->ID3.year && strlen(ttainfo->ID3.year)) + tuple->year = atoi(ttainfo->ID3.year); + + if(ttainfo->ID3.track && strlen(ttainfo->ID3.track)) + tuple->track_number = atoi(ttainfo->ID3.track); + + if(ttainfo->ID3.genre && strlen(ttainfo->ID3.genre)) + tuple->genre = g_strdup(ttainfo->ID3.genre); + + if(ttainfo->ID3.comment && strlen(ttainfo->ID3.comment)) + tuple->comment = g_strdup(ttainfo->ID3.comment); } close_tta_file (ttainfo); }