comparison src/cdaudio-ng/cdaudio-ng.c @ 1706:bec872f5809e

Fixed cdaudio-ng.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 Sep 2007 17:50:10 +0300
parents f6f5603a0954
children b98f403b829f
comparison
equal deleted inserted replaced
1705:b9eca7b33811 1706:bec872f5809e
823 823
824 if (trackno < firsttrackno || trackno > lasttrackno) 824 if (trackno < firsttrackno || trackno > lasttrackno)
825 return NULL; 825 return NULL;
826 826
827 if(strlen(trackinfo[trackno].performer)) { 827 if(strlen(trackinfo[trackno].performer)) {
828 tuple_associate_string(tuple, "artist", trackinfo[trackno].performer); 828 tuple_associate_string(tuple, FIELD_ARTIST, NULL, trackinfo[trackno].performer);
829 } 829 }
830 if(strlen(trackinfo[0].name)) { 830 if(strlen(trackinfo[0].name)) {
831 tuple_associate_string(tuple, "album", trackinfo[0].name); 831 tuple_associate_string(tuple, FIELD_ALBUM, NULL trackinfo[0].name);
832 } 832 }
833 if(strlen(trackinfo[trackno].name)) { 833 if(strlen(trackinfo[trackno].name)) {
834 tuple_associate_string(tuple, "title", trackinfo[trackno].name); 834 tuple_associate_string(tuple, FIELD_TITLE, NULL, trackinfo[trackno].name);
835 } 835 }
836 tuple_associate_int(tuple, "track-number", trackno); 836 tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, trackno);
837 tuple_associate_string(tuple, "ext", "cda"); //XXX should do? --yaz 837 tuple_associate_string(tuple, -1, "ext", "cda"); //XXX should do? --yaz
838 838
839 tuple_associate_int(tuple, "length", calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn)); 839 tuple_associate_int(tuple, FIELD_LENGTH, NULL, calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn));
840 if(strlen(trackinfo[trackno].genre)) { 840 if(strlen(trackinfo[trackno].genre)) {
841 tuple_associate_string(tuple, "genre", trackinfo[trackno].genre); 841 tuple_associate_string(tuple, FIELD_GENRE, NULL, trackinfo[trackno].genre);
842 } 842 }
843 //tuple->year = 0; todo: set the year 843 //tuple->year = 0; todo: set the year
844 844
845 return tuple; 845 return tuple;
846 } 846 }