WATC Movie: initial commmit
[maevies] / src / extra_scenes_provider.c
index c4f2b43..a261c43 100644 (file)
@@ -2,7 +2,7 @@
  * 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
@@ -26,6 +26,18 @@ gboolean has_stingers(const gchar *movie) {
         * 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;
 }