Author: duncan
Date: Sat Feb  9 16:05:01 2008
New Revision: 10352

Log:
[ 1890214 ] little change youtube.py
Patch from owen applied


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

Modified: branches/rel-1-7/freevo/ChangeLog
==============================================================================
--- branches/rel-1-7/freevo/ChangeLog   (original)
+++ branches/rel-1-7/freevo/ChangeLog   Sat Feb  9 16:05:01 2008
@@ -20,6 +20,7 @@
  * Updated tv guide with scheduled to record and favorite icons (F#1886621)
  * Updated tv program to stop reporting that a program is over (F#1886568)
  * Updated xml tv epg to allow a timezone to be specified (F#1889376)
+ * Updated youtube video plug-in to look up two links (F#1890214)
  * Fixed cdbackup plug-in to allow empty parameters (B#1889068)
  * Fixed the main program to cause a crash when local_conf.py is invalid 
(B#1886624)
  * Fixed web servers encoding interface (B#1885914)

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        Sat Feb  9 
16:05:01 2008
@@ -241,7 +241,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)

Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog     (original)
+++ branches/rel-1/freevo/ChangeLog     Sat Feb  9 16:05:01 2008
@@ -23,6 +23,7 @@
  * Updated tv guide with scheduled to record and favorite icons (F#1886621)
  * Updated tv program to stop reporting that a program is over (F#1886568)
  * Updated xml tv epg to allow a timezone to be specified (F#1889376)
+ * Updated youtube video plug-in to look up two links (F#1890214)
  * Fixed cdbackup plug-in to allow empty parameters (B#1889068)
  * Fixed the main program to cause a crash when local_conf.py is invalid 
(B#1886624)
  * Fixed web servers encoding interface (B#1885914)

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  Sat Feb  9 16:05:01 2008
@@ -241,7 +241,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)

-------------------------------------------------------------------------
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