From: <gre...@us...> - 2007-07-18 21:30:17
|
Revision: 737 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=737&view=rev Author: gregmac45 Date: 2007-07-18 14:30:12 -0700 (Wed, 18 Jul 2007) Log Message: ----------- Fixed videos no longer working Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos/BlipTvUtil.cs Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/BlipTvUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/BlipTvUtil.cs 2007-07-18 15:54:16 UTC (rev 736) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/BlipTvUtil.cs 2007-07-18 21:30:12 UTC (rev 737) @@ -22,9 +22,19 @@ public override String getUrl(String fsId) - { - - return fsId + "&txe=.flv"; + { + String lsUrl = ""; + Log.Info("BlipTv getUrl with "+fsId); + String lsHtml = getHTMLData(fsId); + Match loMatch = Regex.Match(lsHtml,"class=\"permalink_input\" value=\"([^\"]*.flv)"); + if(loMatch.Success){ + lsUrl = loMatch.Groups[1].Value; + //lsUrl = System.Web.HttpUtility.UrlDecode(lsUrl); + //lsUrl = "http://blip.tv"+lsUrl; + }else{ + Log.Info("BlipTv video not found. Site may have changed layout."); + } + return lsUrl; } public override List<GUIOnlineVideos.VideoInfo> getVideoList(string fsUrl) @@ -37,12 +47,7 @@ video.Description = rssItem.mediaDescription; video.ImageUrl = rssItem.mediaThumbnail; video.Title = rssItem.title; - foreach(MediaContent content in rssItem.contentList){ - if(content.type.Contains("flv")){ - video.VideoUrl = content.url; - break; - } - } + video.VideoUrl = rssItem.link; loVideoList.Add(video); } return loVideoList; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |