[totem] Bug 614679 — cannot play youtube videos
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Bug 614679 — cannot play youtube videos
- Date: Sun, 4 Apr 2010 23:59:34 +0000 (UTC)
commit 93f289d3532912b5976cfb1260fed713cc52a495
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Apr 5 00:57:12 2010 +0100
Bug 614679 â?? cannot play youtube videos
Update the regex used to grab the t-param from YouTube pages. Why do Google
always update YouTube just after a GNOME release? Closes: bgo#614679
src/plugins/youtube/totem-youtube.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/youtube/totem-youtube.c b/src/plugins/youtube/totem-youtube.c
index 08c34d5..2d8fc8f 100644
--- a/src/plugins/youtube/totem-youtube.c
+++ b/src/plugins/youtube/totem-youtube.c
@@ -852,7 +852,9 @@ 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 ("'SWF_ARGS'.*\"t\": \"([^\"]+)\"", G_REGEX_OPTIMIZE, 0, NULL);
+ /* We're looking for a line of the form:
+ * var swfHTML = (isIE) ? "<object...econds=194&t=vjVQa1PpcFP36LLlIaDqZIG1w6e30b-7WVBgsQLLA3s%3D&rv.6.id=OzLjC6Pm... */
+ self->regex = g_regex_new ("swfHTML = .*&t=([^&]+)&", G_REGEX_OPTIMIZE, 0, NULL);
g_assert (self->regex != NULL);
/* Set up the GData service (needed for the tree views' queries) */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]