diff src/sexypsf/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 de310b4826de
children 195b5657303e
line wrap: on
line diff
--- a/src/sexypsf/plugin.c	Fri Aug 10 13:49:59 2007 +0100
+++ b/src/sexypsf/plugin.c	Fri Aug 10 14:01:43 2007 +0100
@@ -225,9 +225,7 @@
     PSFINFO *tmp = sexypsf_getpsfinfo(fn);
 
     if (tmp->length) {
-        gchar *scratch;
-
-        tuple = tuple_new();
+        tuple = tuple_new_from_filename(fn);
 	tuple_associate_int(tuple, "length", tmp->length);
 	tuple_associate_string(tuple, "artist", tmp->artist);
 	tuple_associate_string(tuple, "album", tmp->game);
@@ -241,14 +239,6 @@
         tuple_associate_string(tuple, "dumper", tmp->psfby);
         tuple_associate_string(tuple, "comment", tmp->comment);
 
-        scratch = g_path_get_basename(fn);
-        tuple_associate_string(tuple, "file-name", scratch);
-        g_free(scratch);
-
-        scratch = g_path_get_dirname(fn);
-        tuple_associate_string(tuple, "file-path", scratch);
-        g_free(scratch);
-
         sexypsf_freepsfinfo(tmp);
     }