+static gchar* filename_from_object_id(
+ const gchar *object_id)
+{
+ /* TODO: Strip off the extension */
+ g_return_val_if_fail (object_id, NULL);
+
+ gchar *path_uri = g_filename_display_basename( object_id ); /* Remove "localtagfs::music/songs". Pointer arith. would probably work, but I don't wan't to hardcode anything. */
+ gchar *path_unescaped = g_uri_unescape_string( path_uri, NULL ); /* Make the string look normal */
+ gchar *ret_filename = g_filename_display_basename( path_unescaped ); /* Get the filename w/out path */
+
+ g_free (path_uri);
+ g_free (path_unescaped);
+
+ return ret_filename ? ret_filename : NULL;
+}
+