From: <se...@us...> - 2008-07-01 05:21:36
|
Revision: 1880 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1880&view=rev Author: sergem1 Date: 2008-06-30 22:21:33 -0700 (Mon, 30 Jun 2008) Log Message: ----------- This is 0.2.3 update commit before V1 RC1 Refresh makeover Modified Paths: -------------- trunk/plugins/ETVNet/ETVNet/ETVBrowser.cs trunk/plugins/ETVNet/ETVNet/Plugin.cs Modified: trunk/plugins/ETVNet/ETVNet/ETVBrowser.cs =================================================================== --- trunk/plugins/ETVNet/ETVNet/ETVBrowser.cs 2008-06-30 22:08:52 UTC (rev 1879) +++ trunk/plugins/ETVNet/ETVNet/ETVBrowser.cs 2008-07-01 05:21:33 UTC (rev 1880) @@ -143,18 +143,15 @@ | RegexOptions.Compiled ); regexTodayEntries = new Regex( - @"<td[^>]*?>\d\d(\d\d-\d\d-\d\d)\s(\d\d:\d\d)</td>\s*"+"\r\n"+ @" - <td[^>" - + @"]*?>\s*\[<a\s+href=""([^""]*?)""\s*>[^<]*?</a>\]\s*</td>\s*" +"\r\n" - + @"<td[^>]*?>.*?<a\s+href=""([^""]*?)""\s*>([^<]*?)</a>.*?</td>" - + @"\s*"+"\r\n"+ @"<td[^>]*?>(.*?)</td>"+"\r\n"+ @"", - RegexOptions.IgnoreCase - | RegexOptions.Singleline - | RegexOptions.CultureInvariant - | RegexOptions.IgnorePatternWhitespace - | RegexOptions.Compiled - ); - + "<td[^>]*?>\\d\\d(\\d\\d-\\d\\d-\\d\\d)\\s(\\d\\d:\\d\\d)</td"+ + ">\\s*\r\n<td[^>]*?>.*?href=\"([^\"]*?)\"\\s*>[^<]*?</a>.*?\r\n<t"+ + "d[^>]*?>.*?href=\"([^\"]*?)\"\\s*>([^<]*?)</a>.*?", + RegexOptions.IgnoreCase + | RegexOptions.Singleline + | RegexOptions.CultureInvariant + | RegexOptions.IgnorePatternWhitespace + | RegexOptions.Compiled + ); } public void login(string username, string password) @@ -182,7 +179,8 @@ { foreach (Capture streamtype in match.Groups[3].Captures) { - streams[streamtype.Value] = new System.Collections.ArrayList(); + if (streamtype.Value != null && streamtype.Value != "") + streams[streamtype.Value] = new System.Collections.ArrayList(); } } // @@ -267,7 +265,6 @@ entry.Add("infoUrl", new Uri(baseUrl, match.Groups[4].Value).AbsoluteUri); entry.Add("url", new Uri(baseUrl, match.Groups[5].Value).AbsoluteUri); entry.Add("name", HttpUtility.HtmlDecode(match.Groups[6].Value)); - entry.Add("length", HttpUtility.HtmlDecode(match.Groups[7].Value)); entry.Add("pageType", "archive"); list.Add(entry); } @@ -284,7 +281,6 @@ entry.Add("infoUrl", new Uri(baseUrl, match.Groups[3].Value).AbsoluteUri); entry.Add("url", new Uri(baseUrl, match.Groups[4].Value).AbsoluteUri); entry.Add("name", HttpUtility.HtmlDecode(match.Groups[5].Value)); - entry.Add("length", HttpUtility.HtmlDecode(match.Groups[6].Value)); entry.Add("pageType", "today"); list.Add(entry); } Modified: trunk/plugins/ETVNet/ETVNet/Plugin.cs =================================================================== --- trunk/plugins/ETVNet/ETVNet/Plugin.cs 2008-06-30 22:08:52 UTC (rev 1879) +++ trunk/plugins/ETVNet/ETVNet/Plugin.cs 2008-07-01 05:21:33 UTC (rev 1880) @@ -55,6 +55,7 @@ PathNode currentNode; string username; string password; + bool useVMR9 = true; bool traceHTML; public Plugin() @@ -161,11 +162,8 @@ { username = xmlreader.GetValueAsString("ETVNet", "username", "demo"); password = xmlreader.GetValueAsString("ETVNet", "password", "demo"); - string traceHTMLstr = xmlreader.GetValueAsString("ETVNet", "traceHTML", "false"); - if (traceHTMLstr == "true") - traceHTML = true; - else - traceHTML = false; + useVMR9 = xmlreader.GetValueAsBool("general", "usevrm9forwebstreams", true); + traceHTML = xmlreader.GetValueAsBool("ETVNet", "traceHTML", false); } currentNode = new TopList(username, password,traceHTML); return Load(GUIGraphicsContext.Skin + @"\etvnet.main.xml"); @@ -259,13 +257,15 @@ return; } // show movie - if (g_Player.Play(mms)) + bool playOk = false; + if (useVMR9) + playOk = g_Player.PlayVideoStream(mms,currentNode.getLabel()); + else + playOk = g_Player.Play(mms); + if (playOk) { - if (MediaPortal.Util.Utils.IsVideo(mms)) - { - GUIGraphicsContext.IsFullScreenVideo = true; - GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); - } + GUIGraphicsContext.IsFullScreenVideo = true; + GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); } } return; @@ -341,4 +341,4 @@ } #endregion } -} \ No newline at end of file +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |