comparison src/alac/plugin.c @ 1687:d158ce84fda7

Modified for Tuplez/plugin API changes.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 05 Sep 2007 09:29:26 +0300
parents 3a252050736c
children f35f9d6fcb6d
comparison
equal deleted inserted replaced
1600:49fe2225d236 1687:d158ce84fda7
120 Tuple *build_tuple_from_demux(demux_res_t *demux_res, char *path) 120 Tuple *build_tuple_from_demux(demux_res_t *demux_res, char *path)
121 { 121 {
122 Tuple *ti = tuple_new_from_filename(path); 122 Tuple *ti = tuple_new_from_filename(path);
123 123
124 if (demux_res->tuple.art != NULL) 124 if (demux_res->tuple.art != NULL)
125 tuple_associate_string(ti, "artist", demux_res->tuple.art); 125 tuple_associate_string(ti, FIELD_ARTIST, NULL, demux_res->tuple.art);
126 if (demux_res->tuple.nam != NULL) 126 if (demux_res->tuple.nam != NULL)
127 tuple_associate_string(ti, "title", demux_res->tuple.nam); 127 tuple_associate_string(ti, FIELD_TITLE, NULL, demux_res->tuple.nam);
128 if (demux_res->tuple.alb != NULL) 128 if (demux_res->tuple.alb != NULL)
129 tuple_associate_string(ti, "album", demux_res->tuple.alb); 129 tuple_associate_string(ti, FIELD_ALBUM, NULL, demux_res->tuple.alb);
130 if (demux_res->tuple.gen != NULL) 130 if (demux_res->tuple.gen != NULL)
131 tuple_associate_string(ti, "genre", demux_res->tuple.gen); 131 tuple_associate_string(ti, FIELD_GENRE, NULL, demux_res->tuple.gen);
132 if (demux_res->tuple.cmt != NULL) 132 if (demux_res->tuple.cmt != NULL)
133 tuple_associate_string(ti, "comment", demux_res->tuple.cmt); 133 tuple_associate_string(ti, FIELD_COMMENT, NULL, demux_res->tuple.cmt);
134 if (demux_res->tuple.day != NULL) 134 if (demux_res->tuple.day != NULL)
135 tuple_associate_int(ti, "year", atoi(demux_res->tuple.day)); 135 tuple_associate_int(ti, FIELD_YEAR, NULL, atoi(demux_res->tuple.day));
136 136
137 tuple_associate_string(ti, "codec", "Apple Lossless (ALAC)"); 137 tuple_associate_string(ti, FIELD_CODEC, NULL, "Apple Lossless (ALAC)");
138 tuple_associate_string(ti, "quality", "lossless"); 138 tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossless");
139 139
140 return ti; 140 return ti;
141 } 141 }
142 142
143 Tuple *build_tuple(char *filename) 143 Tuple *build_tuple(char *filename)