r22345 - in /desktop/lenny/totem/debian: changelog patches/30_fix_youtube_plugin.patch

joss at users.alioth.debian.org joss at users.alioth.debian.org
Sat Nov 14 15:50:41 UTC 2009


Author: joss
Date: Sat Nov 14 15:50:41 2009
New Revision: 22345

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22345
Log:
30_fix_youtube_plugin.patch: update patch according to recent 
upstream changes. This matches the change on the server side and 
makes the plugin functional again.

Modified:
    desktop/lenny/totem/debian/changelog
    desktop/lenny/totem/debian/patches/30_fix_youtube_plugin.patch

Modified: desktop/lenny/totem/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/lenny/totem/debian/changelog?rev=22345&op=diff
==============================================================================
--- desktop/lenny/totem/debian/changelog [utf-8] (original)
+++ desktop/lenny/totem/debian/changelog [utf-8] Sat Nov 14 15:50:41 2009
@@ -1,3 +1,11 @@
+totem (2.22.2-6) stable; urgency=low
+
+  * 30_fix_youtube_plugin.patch: update patch according to recent 
+    upstream changes. This matches the change on the server side and 
+    makes the plugin functional again.
+
+ -- Josselin Mouette <joss at debian.org>  Sat, 14 Nov 2009 16:46:22 +0100
+
 totem (2.22.2-5) unstable; urgency=low
 
   * Don’t build-depend on libbluetooth-dev on kfreebsd. Closes: #499384.

Modified: desktop/lenny/totem/debian/patches/30_fix_youtube_plugin.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/lenny/totem/debian/patches/30_fix_youtube_plugin.patch?rev=22345&op=diff
==============================================================================
--- desktop/lenny/totem/debian/patches/30_fix_youtube_plugin.patch [utf-8] (original)
+++ desktop/lenny/totem/debian/patches/30_fix_youtube_plugin.patch [utf-8] Sat Nov 14 15:50:41 2009
@@ -1,11 +1,11 @@
 Updated to match changes on the server side.
 Upstream commits in trunk: r5310, r5325, r5349, r5431, r5501, r5778, 
-r5780
+r5780, 72ee35, 95b562
 
 Index: totem-2.22.2/src/plugins/youtube/youtube.py
 ===================================================================
---- totem-2.22.2.orig/src/plugins/youtube/youtube.py	2008-10-25 13:42:12.403333174 +0200
-+++ totem-2.22.2/src/plugins/youtube/youtube.py	2008-10-25 14:22:37.659830788 +0200
+--- totem-2.22.2.orig/src/plugins/youtube/youtube.py	2008-04-21 20:02:56.000000000 +0200
++++ totem-2.22.2/src/plugins/youtube/youtube.py	2009-11-14 16:42:58.737833646 +0100
 @@ -1,5 +1,5 @@
  import totem
 -import gobject, gtk
@@ -13,7 +13,7 @@
  import gdata.service
  import urllib
  import httplib
-@@ -16,12 +16,16 @@ class DownloadThread (threading.Thread):
+@@ -16,12 +16,16 @@
  		threading.Thread.__init__ (self)
  	def run (self):
  		self.youtube.entry_lock.acquire (True)
@@ -32,7 +32,7 @@
  		self.debug = False
  		self.gstreamer_plugins_present = True
  
-@@ -45,6 +49,10 @@ class YouTube (totem.Plugin):
+@@ -45,6 +49,10 @@
  		"""Check for the availability of the flvdemux and soup GStreamer plugins"""
  		bvw_name = totem_object.get_video_widget_backend_name ()
  
@@ -43,7 +43,7 @@
  		if bvw_name.find ("GStreamer") != -1:
  			try:
  				import pygst
-@@ -52,13 +60,13 @@ class YouTube (totem.Plugin):
+@@ -52,13 +60,13 @@
  				import gst
  
  				registry = gst.registry_get_default ()
@@ -59,7 +59,7 @@
  		self.builder = self.load_interface ("youtube.ui", True, totem_object.get_main_window (), self)
  		self.totem = totem_object
  
-@@ -80,7 +88,7 @@ class YouTube (totem.Plugin):
+@@ -80,7 +88,7 @@
  		totem_object.add_sidebar_page ("youtube", _("YouTube"), self.vbox)
  
  		"""Set up the service"""
@@ -68,7 +68,7 @@
  	def deactivate (self, totem):
  		totem.remove_sidebar_page ("youtube")
  	def setup_treeview (self, treeview_name):
-@@ -115,7 +123,37 @@ class YouTube (totem.Plugin):
+@@ -115,7 +123,37 @@
  		self.youtube_id = youtube_id
  		self.start_index["related"] = 1
  		self.results["related"] = 0
@@ -83,7 +83,7 @@
 +	def resolve_t_param (self, youtube_id):
 +		"""We have to get the t parameter from the actual video page, since Google changed how their URLs work"""
 +		stream = urllib.urlopen ("http://youtube.com/watch?v=" + urllib.quote (youtube_id))
-+		regexp1 = re.compile ("swfArgs.*\"t\": \"([^\"]+)\"")
++		regexp1 = re.compile ("'SWF_ARGS'.*\"t\": \"([^\"]+)\"")
 +		regexp2 = re.compile ("</head>")
 +
 +		line = stream.readline ()
@@ -107,7 +107,7 @@
  	def on_starting_video (self, treeview, path, user_data):
  		"""Display an error if the required GStreamer plugins aren't installed"""
  		if self.gstreamer_plugins_present == False:
-@@ -126,28 +164,6 @@ class YouTube (totem.Plugin):
+@@ -126,28 +164,6 @@
  							      self.totem.get_main_window ())
  			return False
  
@@ -136,7 +136,7 @@
  		return True
  	def on_button_press_event (self, widget, event):
  		self.button_down = True
-@@ -159,11 +175,11 @@ class YouTube (totem.Plugin):
+@@ -159,11 +175,11 @@
  		if not self.button_down and (adjustment.get_value () + adjustment.page_size) / adjustment.upper > 0.8 and self.results[self.current_treeview_name] >= self.max_results:
  			self.results[self.current_treeview_name] = 0
  			if self.current_treeview_name == "search":
@@ -150,7 +150,7 @@
  				if self.debug:
  					print "Getting more related videos for video \"" + self.youtube_id + "\" from offset " + str (self.start_index["related"])
  	def convert_url_to_id (self, url):
-@@ -190,14 +206,18 @@ class YouTube (totem.Plugin):
+@@ -190,14 +206,18 @@
  		self.results[treeview_name] += 1
  		self.start_index[treeview_name] += 1
  		youtube_id = self.convert_url_to_id (entry.id.text)
@@ -173,7 +173,7 @@
  
  		"""Download the thumbnail and store it in a temporary location so we can get a pixbuf from it"""
  		thumbnail_url = _element.FindChildren ("thumbnail")[0].attributes['url']
-@@ -216,6 +236,12 @@ class YouTube (totem.Plugin):
+@@ -216,6 +236,12 @@
  		"""Don't leak the temporary file"""
  		unlink (filename)
  
@@ -181,12 +181,12 @@
 +		t_param = self.resolve_t_param (youtube_id)
 +
 +		if t_param != "":
-+			mrl = "http://www.youtube.com/get_video?video_id=" + urllib.quote (youtube_id) + "&t=" + urllib.quote (t_param) + self.get_fmt_string ()
++			mrl = "http://www.youtube.com/get_video?video_id=" + urllib.quote (youtube_id) + "&t=" + t_param + self.get_fmt_string ()
 +
  		self.liststore[treeview_name].append ([pixbuf, entry.title.text, mrl, youtube_id])
  
  		return True
-@@ -231,7 +257,7 @@ class YouTube (totem.Plugin):
+@@ -231,7 +257,7 @@
  		self.search_terms = search_terms
  		self.start_index["search"] = 1
  		self.results["search"] = 0




More information about the pkg-gnome-commits mailing list