diff options
author | Martyn Russell <martyn@lanedo.com> | 2010-10-25 18:44:10 +0100 |
---|---|---|
committer | Martyn Russell <martyn@lanedo.com> | 2010-10-27 15:16:56 +0100 |
commit | 4d074282def197f7a032425b6d4cbb10e3ce297f (patch) | |
tree | e7d36e64f86c20aea004a55ed88e0ab19d07d666 /utils | |
parent | b0e2282c465cc4d550f51b72214c2acb28b50d50 (diff) | |
download | tracker-4d074282def197f7a032425b6d4cbb10e3ce297f.tar.gz |
utils/playlists: Cleaned up CFLAGS/LIBS for playlist2ttl
Diffstat (limited to 'utils')
-rw-r--r-- | utils/playlists/Makefile.am | 11 | ||||
-rw-r--r-- | utils/playlists/playlist2ttl.c | 29 |
2 files changed, 20 insertions, 20 deletions
diff --git a/utils/playlists/Makefile.am b/utils/playlists/Makefile.am index c9d377d48..600d160e4 100644 --- a/utils/playlists/Makefile.am +++ b/utils/playlists/Makefile.am @@ -4,15 +4,12 @@ noinst_PROGRAMS = playlist2ttl INCLUDES = \ $(BUILD_CFLAGS) \ - $(GLIB2_CFLAGS) \ - $(GIO_CFLAGS) \ $(TOTEM_PL_PARSER_CFLAGS) +LDADD = \ + $(BUILD_LIBS) \ + $(TOTEM_PL_PARSER_LIBS) + playlist2ttl_SOURCES = \ playlist2ttl.c -playlist2ttl_LDADD = \ - $(TOTEM_PL_PARSER_LIBS) \ - $(BUILD_LIBS) \ - $(GLIB2_LIBS) \ - $(GIO_LIBS) diff --git a/utils/playlists/playlist2ttl.c b/utils/playlists/playlist2ttl.c index 4b8387e90..6af35c87b 100644 --- a/utils/playlists/playlist2ttl.c +++ b/utils/playlists/playlist2ttl.c @@ -17,11 +17,14 @@ * 02110-1301, USA. */ +#include "config.h" + #include <glib.h> #include <gio/gio.h> + #include <totem-pl-parser.h> -static gchar **filenames = NULL; +static gchar **filenames = NULL; typedef struct { gint tracks ; @@ -37,7 +40,7 @@ static GOptionEntry entries[] = { }; static void -print_header () +print_header (void) { g_print ("@prefix nmo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#>.\n"); g_print ("@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#>.\n"); @@ -46,18 +49,21 @@ print_header () } static void -print_playlist_entry (const gchar *uri) { +print_playlist_entry (const gchar *uri) +{ g_print ("<%s> a nmm:Playlist .\n\n", uri); } static void -entry_parsed (TotemPlParser *parser, const gchar *uri, GHashTable *metadata, gpointer user_data) +entry_parsed (TotemPlParser *parser, + const gchar *uri, + GHashTable *metadata, + gpointer user_data) { - PlaylistData *playlist_data = (PlaylistData *)user_data; + PlaylistData *playlist_data = (PlaylistData*) user_data; playlist_data->tracks += 1; - //uri = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_URI); g_print ("<%s> nfo:hasMediaFileListEntry [ \n", playlist_data->playlist); g_print ("\t a nfo:MediaFileListEntry ; \n"); @@ -65,13 +71,13 @@ entry_parsed (TotemPlParser *parser, const gchar *uri, GHashTable *metadata, gpo g_print ("\t nfo:entryContent <%s> ] .\n\n", uri); } -gint -main (gint argc, gchar **argv) +int +main (int argc, char **argv) { GFile *file; GOptionContext *context = NULL; gchar *uri; - PlaylistData playlist_data = { 0, NULL}; + PlaylistData playlist_data = { 0, NULL}; TotemPlParser *pl; TotemPlParserResult result; GError *error = NULL; @@ -86,8 +92,7 @@ main (gint argc, gchar **argv) if (!g_option_context_parse (context, &argc, &argv, &error) || !filenames) { gchar *help; - g_printerr ("%s\n\n", - "Playlist filename is mandatory"); + g_printerr ("%s\n\n", "Playlist filename is mandatory"); help = g_option_context_get_help (context, TRUE, NULL); g_option_context_free (context); @@ -109,8 +114,6 @@ main (gint argc, gchar **argv) g_object_set (pl, "recurse", FALSE, "disable-unsafe", TRUE, NULL); g_signal_connect (G_OBJECT (pl), "entry-parsed", G_CALLBACK (entry_parsed), &playlist_data); - - result = totem_pl_parser_parse (pl, uri, FALSE); switch (result) { |