comparison src/wav/wav.c @ 1430:bf7d4c236d9f

Start using tuple_new_from_filename.
author Tony Vroon <chainsaw@gentoo.org>
date Fri, 10 Aug 2007 13:49:59 +0100
parents 826b9c0dfccb
children 195b5657303e
comparison
equal deleted inserted replaced
1427:138ea47220e8 1430:bf7d4c236d9f
208 { 208 {
209 Tuple *tuple; 209 Tuple *tuple;
210 gchar *title; 210 gchar *title;
211 gchar *scratch; 211 gchar *scratch;
212 212
213 tuple = tuple_new(); 213 tuple = tuple_new_from_filename(filename);
214
215 scratch = g_path_get_basename(filename);
216 tuple_associate_string(tuple, "file-name", scratch);
217 g_free(scratch);
218
219 tuple_associate_string(tuple, "file-ext", get_extension(filename));
220
221 scratch = g_path_get_dirname(filename);
222 tuple_associate_string(tuple, "file-path", scratch);
223 g_free(scratch);
224 214
225 tuple_associate_string(tuple, "codec", "RIFF/WAV Audio (ADPCM)"); 215 tuple_associate_string(tuple, "codec", "RIFF/WAV Audio (ADPCM)");
226 tuple_associate_string(tuple, "quality", "lossless"); 216 tuple_associate_string(tuple, "quality", "lossless");
227 217
228 title = tuple_formatter_process_string(tuple, cfg.gentitle_format); 218 title = tuple_formatter_process_string(tuple, cfg.gentitle_format);