Author: duncan
Date: Sun Mar  2 15:27:40 2008
New Revision: 10460

Log:
[ 1905603 ] youtube
Patch from Alberto Gonzalez applied


Modified:
   branches/rel-1-7/freevo/src/video/plugins/youtube.py
   branches/rel-1/freevo/src/video/plugins/youtube.py

Modified: branches/rel-1-7/freevo/src/video/plugins/youtube.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/plugins/youtube.py        (original)
+++ branches/rel-1-7/freevo/src/video/plugins/youtube.py        Sun Mar  2 
15:27:40 2008
@@ -206,7 +206,7 @@
         playvideo2.play()
 
 
-    def search_list(parent, menuw, text=""):
+    def search_list(parent, menuw, text=''):
         """Get the video list for a specific user"""
         _debug_('search_list(parent=%r, menuw=%r, text=%r)' % (parent, menuw, 
text), 2)
         items = []
@@ -216,7 +216,12 @@
         box.show()
         for video in service.GetFeed(feed).entry:
             date = video.published.text.split('T')
-            id = video.link[1].href.split('watch?v=');
+            if video.link[1].href.find('watch?v=') >= 0:
+                id = video.link[1].href.split('watch?v=');
+            elif video.link[0].href.find('watch?v=') >= 0:
+                id = video.link[0].href.split('watch?v=');
+            else:
+                continue   
             mi = menu.MenuItem(date[0] + ' ' + video.title.text, 
parent.downloadvideo, id[1])
             mi.arg = (video.title.text, id[1])
             text = util.htmlenties2txt(video.content)
@@ -241,10 +246,10 @@
         box.show()
         for video in service.GetFeed(feed).entry:
             date = video.published.text.split('T')
-            if video.link[1].href.find("watch?v=") >= 0:
-                id = video.link[1].href.split("watch?v=");
-            elif video.link[0].href.find("watch?v=") >= 0:
-                id = video.link[0].href.split("watch?v=");
+            if video.link[1].href.find('watch?v=') >= 0:
+                id = video.link[1].href.split('watch?v=');
+            elif video.link[0].href.find('watch?v=') >= 0:
+                id = video.link[0].href.split('watch?v=');
             else:
                 continue
             mi = menu.MenuItem(date[0] + ' ' + video.title.text, 
parent.downloadvideo, id[1])

Modified: branches/rel-1/freevo/src/video/plugins/youtube.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/youtube.py  (original)
+++ branches/rel-1/freevo/src/video/plugins/youtube.py  Sun Mar  2 15:27:40 2008
@@ -206,7 +206,7 @@
         playvideo2.play()
 
 
-    def search_list(parent, menuw, text=""):
+    def search_list(parent, menuw, text=''):
         """Get the video list for a specific user"""
         _debug_('search_list(parent=%r, menuw=%r, text=%r)' % (parent, menuw, 
text), 2)
         items = []
@@ -216,7 +216,12 @@
         box.show()
         for video in service.GetFeed(feed).entry:
             date = video.published.text.split('T')
-            id = video.link[1].href.split('watch?v=');
+            if video.link[1].href.find('watch?v=') >= 0:
+                id = video.link[1].href.split('watch?v=');
+            elif video.link[0].href.find('watch?v=') >= 0:
+                id = video.link[0].href.split('watch?v=');
+            else:
+                continue   
             mi = menu.MenuItem(date[0] + ' ' + video.title.text, 
parent.downloadvideo, id[1])
             mi.arg = (video.title.text, id[1])
             text = util.htmlenties2txt(video.content)
@@ -241,10 +246,10 @@
         box.show()
         for video in service.GetFeed(feed).entry:
             date = video.published.text.split('T')
-            if video.link[1].href.find("watch?v=") >= 0:
-                id = video.link[1].href.split("watch?v=");
-            elif video.link[0].href.find("watch?v=") >= 0:
-                id = video.link[0].href.split("watch?v=");
+            if video.link[1].href.find('watch?v=') >= 0:
+                id = video.link[1].href.split('watch?v=');
+            elif video.link[0].href.find('watch?v=') >= 0:
+                id = video.link[0].href.split('watch?v=');
             else:
                 continue
             mi = menu.MenuItem(date[0] + ' ' + video.title.text, 
parent.downloadvideo, id[1])

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to