* extra_scenes_provider.c
*
* This file is part of maevies
- * Copyright (C) 2009 Simón Pena <bulfaiter@gmail.com>
+ * Copyright (C) 2009 Simón Pena <spenap@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
#include "extra_scenes_provider.h"
#include "watc_provider.h"
-int has_stingers(const char *movie) {
+gboolean has_stingers(const gchar *movie) {
- /* Here there should be a mechanism
+ /* There should be a mechanism here
* allowing us to dynamically load new libraries
* dlopen - http://stackoverflow.com/questions/384121/creating-a-module-system-dynamic-loading-in-c
* Until we get it, we'll use just one of the provided providers ;)
*/
- return watc_has_stingers(movie);
+ GSList *result_list = watc_has_stingers(movie);
+ WATCInfo *result = NULL;
+ gboolean value = FALSE;
+ if (g_slist_length(result_list) == 1) {
+ result = (WATCInfo *) g_slist_nth(result_list, 0);
+ if (result != NULL)
+ value = result->has_stingers;
+ }
+
+ watcinfo_list_unref(result_list);
+
+ return value;
}