Blob Blame History Raw
From 95b56216aee80c7e95d0e7d033ff8e1a63852813 Mon Sep 17 00:00:00 2001
From: Philip Withnall <philip@tecnocode.co.uk>
Date: Tue, 3 Nov 2009 12:12:53 +0000
Subject: [PATCH] =?UTF-8?q?Bug=20600369=20=E2=80=94=20YouTube=20plugin=20does=20not=20work?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixed the regex to correctly extract the t param for YouTube video
queries again. Closes: bgo#600369
---
 src/plugins/youtube/totem-youtube.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/youtube/totem-youtube.c b/src/plugins/youtube/totem-youtube.c
index d2ff64b..9836749 100644
--- a/src/plugins/youtube/totem-youtube.c
+++ b/src/plugins/youtube/totem-youtube.c
@@ -726,7 +726,7 @@ query_progress_cb (GDataEntry *entry, guint entry_key, guint entry_count, QueryD
 	g_assert (self->cancellable[data->tree_view] != NULL);
 
 	/* Add the entry to the tree view */
-	title = gdata_youtube_video_get_title (GDATA_YOUTUBE_VIDEO (entry));
+	title = gdata_entry_get_title (entry);
 	id = gdata_youtube_video_get_video_id (GDATA_YOUTUBE_VIDEO (entry));
 
 	gtk_list_store_append (self->list_store[data->tree_view], &iter);
@@ -851,7 +851,7 @@ search_button_clicked_cb (GtkButton *button, TotemYouTubePlugin *self)
 		/* If this is the first query, compile the regex used to resolve the t param. Doing this here rather than when
 		 * activating the plugin means we don't waste cycles if the plugin's never used. It also means we don't waste
 		 * cycles repeatedly creating new regexes for each video whose t param we resolve. */
-		self->regex = g_regex_new ("swfArgs.*\"t\": \"([^\"]+)\"", G_REGEX_OPTIMIZE, 0, NULL);
+		self->regex = g_regex_new ("'SWF_ARGS'.*\"t\": \"([^\"]+)\"", G_REGEX_OPTIMIZE, 0, NULL);
 		g_assert (self->regex != NULL);
 
 		/* Set up the GData service (needed for the tree views' queries) */
-- 
1.6.5.1