1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
--- configure.in.bak 2011-07-22 11:21:18.453707088 +0200
+++ configure.in 2011-07-22 11:22:43.436708307 +0200
@@ -486,6 +486,13 @@
AC_DEFINE([HAVE_LIBGDATA_0_7],[1],[Define if libgdata >= 0.7.0 is available])
fi
+ # For the API breaks in libgdata 0.9. Remove this once we depend on libgdata >= 0.9.1
+ PKG_CHECK_MODULES(LIBGDATA_0_9, libgdata >= 0.9.1,
+ [HAVE_LIBGDATA_0_9=yes], [HAVE_LIBGDATA_0_9=no])
+ if test "${HAVE_LIBGDATA_0_9}" = "yes" ; then
+ AC_DEFINE([HAVE_LIBGDATA_0_9],[1],[Define if libgdata >= 0.9.1 is available])
+ fi
+
PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4,
[HAVE_LIBSOUP=yes], [HAVE_LIBSOUP=no])
if test "${HAVE_LIBSOUP}" != "yes" ; then
--- src/plugins/youtube/totem-youtube.c.bak 2011-07-22 11:23:42.454705452 +0200
+++ src/plugins/youtube/totem-youtube.c 2011-07-22 11:28:20.071707003 +0200
@@ -591,6 +591,18 @@
if (clear_tree_view == TRUE)
gtk_list_store_clear (self->priv->list_store[tree_view]);
+#ifdef HAVE_LIBGDATA_0_9
+ if (tree_view == SEARCH_TREE_VIEW) {
+ gdata_youtube_service_query_videos_async (self->priv->service, self->priv->query[tree_view], data->query_cancellable,
+ (GDataQueryProgressCallback) query_progress_cb, data, NULL,
+ (GAsyncReadyCallback) query_finished_cb, data);
+ } else {
+ gdata_youtube_service_query_related_async (self->priv->service, self->priv->playing_video, self->priv->query[tree_view],
+ data->query_cancellable, (GDataQueryProgressCallback) query_progress_cb, data, NULL,
+ (GAsyncReadyCallback) query_finished_cb, data);
+ }
+#else
+
if (tree_view == SEARCH_TREE_VIEW) {
gdata_youtube_service_query_videos_async (self->priv->service, self->priv->query[tree_view], data->query_cancellable,
(GDataQueryProgressCallback) query_progress_cb, data,
@@ -600,6 +612,7 @@
data->query_cancellable, (GDataQueryProgressCallback) query_progress_cb, data,
(GAsyncReadyCallback) query_finished_cb, data);
}
+#endif /* !HAVE_LIBGDATA_0_9 */
}
void
@@ -634,7 +647,11 @@
g_assert (priv->regex != NULL);
/* Set up the GData service (needed for the tree views' queries) */
+#ifdef HAVE_LIBGDATA_0_9
+ priv->service = gdata_youtube_service_new (DEVELOPER_KEY, NULL);
+#else
priv->service = gdata_youtube_service_new (DEVELOPER_KEY, CLIENT_ID);
+#endif /* !HAVE_LIBGDATA_0_9 */
/* Set up network timeouts, if they're supported by our version of libgdata.
* This will return from queries with %GDATA_SERVICE_ERROR_NETWORK_ERROR if network operations take longer than 30 seconds. */
|