Mercurial > audlegacy-plugins
diff src/alac/plugin.c @ 1431:6b1f888a4c52
Use tuple_new_from_filename in more plugins.
author | Tony Vroon <chainsaw@gentoo.org> |
---|---|
date | Fri, 10 Aug 2007 14:01:43 +0100 |
parents | c5bbf2c90ba3 |
children | 195b5657303e |
line wrap: on
line diff
--- a/src/alac/plugin.c Fri Aug 10 13:49:59 2007 +0100 +++ b/src/alac/plugin.c Fri Aug 10 14:01:43 2007 +0100 @@ -119,8 +119,7 @@ Tuple *build_tuple_from_demux(demux_res_t *demux_res, char *path) { - Tuple *ti = tuple_new(); - gchar *scratch; + Tuple *ti = tuple_new_from_filename(path); if (demux_res->tuple.art != NULL) tuple_associate_string(ti, "artist", demux_res->tuple.art); @@ -135,15 +134,6 @@ if (demux_res->tuple.day != NULL) tuple_associate_int(ti, "year", atoi(demux_res->tuple.day)); - scratch = g_path_get_basename(path); - tuple_associate_string(ti, "file-name", scratch); - g_free(scratch); - - scratch = g_path_get_dirname(path); - tuple_associate_string(ti, "file-path", scratch); - g_free(scratch); - - tuple_associate_string(ti, "file-ext", extname(path)); tuple_associate_string(ti, "codec", "Apple Lossless (ALAC)"); tuple_associate_string(ti, "quality", "lossless");