};
static void
-response_received_callback (MvsMInfoProvider *minfo_provider, GList *list,
- gpointer user_data)
+response_received_cb (MvsMInfoProvider *minfo_provider, guint service,
+ GList *list, gpointer user_data)
{
GList *tmp = NULL;
g_object_unref (tmdb_movie);
}
+ else if (MVS_IS_WATC_MOVIE (tmp->data)) {
+
+ MvsWatcMovie *watc_movie = MVS_WATC_MOVIE (tmp->data);
+
+ mvs_watc_movie_print (watc_movie);
+ g_print ("\n");
+
+ g_object_unref (watc_movie);
+ }
}
g_list_free (list);
{
MvsMInfoProvider *minfo_provider = NULL;
GOptionContext *context = NULL;
- GOptionGroup *gst_option_group = NULL;
GError *error = NULL;
MvsService service = MVS_SERVICE_TMDB;
g_type_init ();
-
- g_thread_init (NULL);
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
context = g_option_context_new (" - Tests data provider behavior");
g_option_context_add_main_entries (context, entries, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error)) {
g_critical ("option parsing failed: %s", error->message);
+ g_error_free (error);
+ g_option_context_free (context);
return -1;
}
minfo_provider = mvs_minfo_provider_new ();
g_signal_connect (minfo_provider, "response-received",
- G_CALLBACK (response_received_callback), NULL);
+ G_CALLBACK (response_received_cb), NULL);
loop = g_main_loop_new (NULL, FALSE);
query);
g_main_loop_run (loop);
+
g_object_unref (minfo_provider);
g_main_loop_unref (loop);
+ g_option_context_free (context);
return 0;
}