From: <gre...@us...> - 2007-08-22 23:07:37
|
Revision: 857 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=857&view=rev Author: gregmac45 Date: 2007-08-22 16:07:31 -0700 (Wed, 22 Aug 2007) Log Message: ----------- Added search for AppleTrailers Added Remove Favorites from local db Fixed thumbnails always downloaded bug Using JW Media Player swf to play FLVs Added ability to seek when in fullscreen using the arrows Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos/FavoriteUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/Favorites.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ImageDowloader.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesTrailerUtil.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/AppleTrailers.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsContent.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsHelper.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/TrailerIndex.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/Main.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs trunk/plugins/OnlineVideos/Source/OnlineVideos/YouTubeUtil.cs Added Paths: ----------- trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.resx Added: trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.resx =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.resx (rev 0) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/Configuration.resx 2007-08-22 23:07:31 UTC (rev 857) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/FavoriteUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/FavoriteUtil.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/FavoriteUtil.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -47,7 +47,7 @@ } public override List<GUIOnlineVideos.VideoInfo> getVideoList(string fsUrl) { - + fsUrl = fsUrl.Substring(4); FavoritesDatabase db = FavoritesDatabase.getInstance(); List<GUIOnlineVideos.VideoInfo> loVideoList; if(String.IsNullOrEmpty(fsUrl)){ @@ -67,7 +67,7 @@ { GUIOnlineVideos.RssLink all = new GUIOnlineVideos.RssLink(); all.name = "All"; - all.url = ""; + all.url = "fav:"; List<OnlineVideos.GUIOnlineVideos.RssLink> cats = new List<OnlineVideos.GUIOnlineVideos.RssLink>(); cats.Add(all); @@ -80,13 +80,13 @@ loSite = loSiteList[lsSiteId]; cat = new GUIOnlineVideos.RssLink(); cat.name = loSite.name+"-Favorites"; - cat.url = loSite.id; + cat.url = "fav:"+loSite.id; cats.Add(cat); } cat = new GUIOnlineVideos.RssLink(); cat.name = "Search-Favorites"; - cat.url = "%{0}"; + cat.url = "fav:%{0}"; cats.Add(cat); //SiteUtilFactory.getSiteUtil( Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/Favorites.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/Favorites.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/Favorites.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -82,7 +82,7 @@ } try { - m_db.Execute("CREATE TABLE FAVORITE_VIDEOS(VDO_NM text,VDO_URL text,VDO_DESC text,VDO_TAGS text,VDO_LENGTH text,VDO_OTHER_NFO text,VDO_IMG_URL text,VDO_SITE_ID text)\n"); + m_db.Execute("CREATE TABLE FAVORITE_VIDEOS(VDO_ID integer primary key autoincrement,VDO_NM text,VDO_URL text,VDO_DESC text,VDO_TAGS text,VDO_LENGTH text,VDO_OTHER_NFO text,VDO_IMG_URL text,VDO_SITE_ID text)\n"); //m_db.Execute("CREATE TABLE FAVORITE(FAVORITE_ID integer primary key,FAVORITE_NM text)\n"); @@ -138,16 +138,11 @@ } - public bool removeFavoriteVideo(GUIOnlineVideos.FavoriteVideoInfo foVideo, GUIOnlineVideos.Site foSite) + public bool removeFavoriteVideo(GUIOnlineVideos.VideoInfo foVideo) { - /* - string lsSQL = String.Format("select FAVORITE_ID from FAVORITE where FAVORITE_NM='{0}'", fsFavoriteNm.Replace("'", "''")); - SQLiteResultSet loResultSet = m_db.Execute(lsSQL); - - string lsFavID = (String)loResultSet.GetColumn(0)[0]; - //Log.Info("fav id = {0}",lsFavID); - //Log.Info("song id = {0}", foVideo.songId); - lsSQL = string.Format("delete from FAVORITE_VIDEOS where SONG_ID='{0}' and FAVORITE_ID = {1}", foVideo.songId, lsFavID); + + + String lsSQL = string.Format("delete from FAVORITE_VIDEOS where VDO_ID='{0}' ", foVideo.VideoID); m_db.Execute(lsSQL); if (m_db.ChangedRows() > 0) { @@ -157,8 +152,8 @@ { return false; } - */ - return false; + + } @@ -193,7 +188,7 @@ video.Title = DatabaseUtility.Get(loResultSet, iRow, "VDO_NM"); video.VideoUrl = DatabaseUtility.Get(loResultSet,iRow,"VDO_URL"); video.SiteID = DatabaseUtility.Get(loResultSet,iRow,"VDO_SITE_ID"); - + video.VideoID = DatabaseUtility.GetAsInt(loResultSet,iRow,"VDO_ID"); Log.Info("Pulled {0} out of the database",video.Title); loFavoriteList.Add(video); Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -83,9 +83,11 @@ public String Tags = ""; public Object Other; public string SiteID = ""; + public int VideoID; public VideoInfo() { Length = -1; + VideoID = -1; } } public class FavoriteVideoInfo:VideoInfo @@ -236,6 +238,7 @@ if (dlgSel != null) { dlgSel.Add("Save"); // Save + Log.Info("msSelectedCategoryValue = "+msSelectedCategoryValue); if(msSelectedCategoryValue.StartsWith("fav:") ==false){ dlgSel.Add("Add to favorites"); } @@ -265,9 +268,10 @@ siteUtil.AddFavorite(moCurrentVideoList[liSelected],msSelectedSiteId); }else{ - siteUtil.removeFavorite(moCurrentVideoList[liSelected].VideoUrl,loSite.username,loSite.password); + siteUtil.RemoveFavorite(moCurrentVideoList[liSelected]); + DisplayVideos(true); } - break; + break; case 3: //Log.Info("Getting related videos on {0} using tags:{1}",SiteUtilFactory.getSiteUtil(msSelectedSiteId),moCurrentVideoList[liSelected].Tags); SiteUtilBase site = SiteUtilFactory.getSiteUtil(msSelectedSiteId); @@ -282,7 +286,7 @@ } DisplayVideos(false); break; - + } base.OnShowContextMenu(); } @@ -304,8 +308,6 @@ _CurrentState = State.home; return; } - }else{ - Log.Info("Action:"+action.wID); } base.OnAction(action); } @@ -521,7 +523,7 @@ facadeView.Add(loListItem); //loSiteUtil.getSiteFavorites(); } - */ + */ } /* private bool isSiteFavoriteEnabled(){ @@ -529,7 +531,7 @@ SiteUtilBase loSiteUtil = SiteUtilFactory.getSiteUtil(msSelectedSiteId); return (loSiteUtil.isSiteFavoritesEnabled() && String.IsNullOrEmpty(loSite.username) == false); } - */ + */ private void DisplayVideos(bool fbRefresh) { List<VideoInfo> loListItems; @@ -657,6 +659,10 @@ DisplayVideoInfo(moCurrentVideoList[item.ItemId-1]); } } + public void OnAction2(Action foAction){ + Log.Info("MyFlashPlayer received action:"+foAction.wID); + } + private bool GetUserInputString(ref string sString) { VirtualKeyboard keyBoard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); @@ -875,17 +881,34 @@ GUIControl.HideControl(GetID,12); GUIControl.HideControl(GetID,13); GUIControl.HideControl(GetID,14); + GUIControl.HideControl(GetID,111); + GUIControl.HideControl(GetID,121); + GUIControl.HideControl(GetID,131); + GUIControl.HideControl(GetID,141); }else{ GUIPropertyManager.SetProperty("#videotitle", foVideo.Title); - GUIPropertyManager.SetProperty("#tags", foVideo.Tags); + if(String.IsNullOrEmpty(foVideo.Tags)){ + GUIPropertyManager.SetProperty("#tags", "None"); + //GUIPropertyManager. + }else{ + GUIPropertyManager.SetProperty("#tags", foVideo.Tags); + } TimeSpan t = TimeSpan.FromSeconds(foVideo.Length); GUIPropertyManager.SetProperty("#length", t.ToString()); - GUIPropertyManager.SetProperty("#desc", foVideo.Description); + if(String.IsNullOrEmpty(foVideo.Description)){ + GUIPropertyManager.SetProperty("#desc", "None"); + }else{ + GUIPropertyManager.SetProperty("#desc", foVideo.Description); + } GUIControl.ShowControl(GetID,11); GUIControl.ShowControl(GetID,12); GUIControl.ShowControl(GetID,13); GUIControl.ShowControl(GetID,14); + GUIControl.ShowControl(GetID,111); + GUIControl.ShowControl(GetID,121); + GUIControl.ShowControl(GetID,131); + GUIControl.ShowControl(GetID,141); //Log.Info(foVideo.Description); } } Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/ImageDowloader.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/ImageDowloader.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/ImageDowloader.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -9,80 +9,80 @@ using System.Net; namespace OnlineVideos { - public static class ImageDownloader - { - #region OldCode - public static bool _imagesDone = false; - public static bool _stopDownload = false; - public static List<String> _imageLocationList = new List<String>(); - - public static void DownloadImages(object sender, DoWorkEventArgs e) - { - _stopDownload = false; - _imagesDone = false; - _imageLocationList = new List<String>(); - Object [] loArguments = (Object [])e.Argument; - GUIFacadeControl facadeView = (GUIFacadeControl)loArguments[0]; - List<String> loImageUrlList = (List<String>) loArguments[1]; - String lsThumbLocation = (String)loArguments[2]; - - - Log.Info("OnlineVideos thumbnails will be saved in {0}",lsThumbLocation); - //int liSelectedIndex = Convert.ToInt32(loArguments[2]); - int liIdx = 0; - List<String> loImageFileList = new List<String>(loImageUrlList.Count); - foreach(String lsUrl in loImageUrlList){ - Log.Info("Getting image :"+lsUrl); - liIdx++; - if (lsUrl == String.Empty) - { - continue; - } - if (_stopDownload) - { - break; - } - string lsThumb = MediaPortal.Util.Utils.GetThumb(lsUrl); - //Log.Info("1)lsThumb = "+lsThumb); - lsThumb = System.IO.Path.GetFileName(lsThumb); - //Log.Info("2)lsThumb = "+lsThumb); - string lsThumbsDir = lsThumbLocation; - if (System.IO.Directory.Exists(lsThumbsDir) ==false) - { - System.IO.Directory.CreateDirectory(lsThumbsDir); - } - lsThumb =lsThumbsDir + lsThumb; - //Log.Info("3)lsThumb = "+lsThumb); - //Log.Info(lsThumb); - if (System.IO.File.Exists(lsThumb) == false) - { - //Log.Info("lsThumb doesn't exist"); - String lsFilename = System.IO.Path.GetFileName(lsThumb); - //moLog.Info("Filename will be {0}", lsFilename); - MediaPortal.Util.Utils.DownLoadImage(lsUrl, lsThumb); - System.Threading.Thread.Sleep(25); - } - if (System.IO.File.Exists(lsThumb)) - { - //Log.Info("lsThumb exist now"); - //facadeView[liIdx].IconImageBig = lsThumb; - loImageFileList.Add(lsThumb); - } - else - { - //Log.Info("lsThumb couldn't be created"); - loImageFileList.Add(""); - //facadeView[liIdx].IconImageBig = ""; - } + public static class ImageDownloader + { + #region OldCode + public static bool _imagesDone = false; + public static bool _stopDownload = false; + public static List<String> _imageLocationList = new List<String>(); + + public static void DownloadImages(object sender, DoWorkEventArgs e) + { + _stopDownload = false; + _imagesDone = false; + _imageLocationList = new List<String>(); + Object [] loArguments = (Object [])e.Argument; + GUIFacadeControl facadeView = (GUIFacadeControl)loArguments[0]; + List<String> loImageUrlList = (List<String>) loArguments[1]; + String lsThumbLocation = (String)loArguments[2]; + + + Log.Info("OnlineVideos thumbnails will be saved in {0}",lsThumbLocation); + //int liSelectedIndex = Convert.ToInt32(loArguments[2]); + int liIdx = 0; + List<String> loImageFileList = new List<String>(loImageUrlList.Count); + foreach(String lsUrl in loImageUrlList){ + Log.Info("Getting image :"+lsUrl); + liIdx++; + if (lsUrl == String.Empty) + { + continue; + } + if (_stopDownload) + { + break; + } + string lsThumb = MediaPortal.Util.Utils.GetThumb(lsUrl); + //Log.Info("1)lsThumb = "+lsThumb); + lsThumb = System.IO.Path.GetFileName(lsThumb); + //Log.Info("2)lsThumb = "+lsThumb); + string lsThumbsDir = lsThumbLocation; + if (System.IO.Directory.Exists(lsThumbsDir) ==false) + { + System.IO.Directory.CreateDirectory(lsThumbsDir); + } + lsThumb =lsThumbsDir + lsThumb; + //Log.Info("3)lsThumb = "+lsThumb); + //Log.Info(lsThumb); + if (System.IO.File.Exists(lsThumb) == false) + { + //Log.Info("lsThumb doesn't exist"); + String lsFilename = System.IO.Path.GetFileName(lsThumb); + //moLog.Info("Filename will be {0}", lsFilename); + MediaPortal.Util.Utils.DownLoadImage(lsUrl, lsThumb); + System.Threading.Thread.Sleep(25); + } + if (System.IO.File.Exists(lsThumb)) + { + //Log.Info("lsThumb exist now"); + //facadeView[liIdx].IconImageBig = lsThumb; + loImageFileList.Add(lsThumb); + } + else + { + //Log.Info("lsThumb couldn't be created"); + loImageFileList.Add(""); + //facadeView[liIdx].IconImageBig = ""; + } //facadeView[liIdx].ThumbnailImage = lsThumb; _imageLocationList.Add(lsThumb); facadeView[liIdx].ItemId = liIdx; //Log.Info("Set item {0} with image {1}", facadeView[liIdx].ItemId,facadeView[liIdx].ThumbnailImage); facadeView[liIdx].RetrieveArt = true; - facadeView[liIdx].RefreshCoverArt(); - - } - /* + facadeView[liIdx].RefreshCoverArt(); + + } + /* foreach (String lsFileName in loImageFileList) { liIdx++; @@ -90,14 +90,14 @@ facadeView[liIdx]. } - */ - _imagesDone = true; - //facadeView.SelectedListItemIndex = liSelectedIndex; - - //GUIControl.SelectItemControl(4755, facadeView.GetID, liSelectedIndex); + */ + _imagesDone = true; + //facadeView.SelectedListItemIndex = liSelectedIndex; + + //GUIControl.SelectItemControl(4755, facadeView.GetID, liSelectedIndex); - } - /* + } + /* public static String DownloadImage(String fsUrl,String fsThumbLocation){ string lsThumb = MediaPortal.Util.Utils.GetThumb(fsUrl); lsThumb = System.IO.Path.GetFileName(lsThumb); @@ -125,87 +125,88 @@ //facadeView[liIdx].IconImageBig = ""; } } - */ - #endregion - public static void getImages(List<String> imageUrlList,String ThumbLocation,GUIFacadeControl facadeView){ - Log.Info("Getting images"); - BackgroundWorker worker = new BackgroundWorker(); + */ + #endregion + public static void getImages(List<String> imageUrlList,String ThumbLocation,GUIFacadeControl facadeView){ + Log.Info("Getting images"); + BackgroundWorker worker = new BackgroundWorker(); Object[] loParms = new Object[4]; - loParms[0] = facadeView; - loParms[1] = imageUrlList; - loParms[2] = ThumbLocation; - worker.DoWork += new DoWorkEventHandler(DownloadImages2); - //_imagesDone = false; - worker.RunWorkerAsync(loParms); + loParms[0] = facadeView; + loParms[1] = imageUrlList; + loParms[2] = ThumbLocation; + worker.DoWork += new DoWorkEventHandler(DownloadImages2); + //_imagesDone = false; + worker.RunWorkerAsync(loParms); - // using (WaitCursor cursor = new WaitCursor()) - // { - // while (_imagesDone == false) - // { - // GUIWindowManager.Process(); - // } - //} - } - - public static void DownloadImages2(object sender, DoWorkEventArgs e) - { - //Log.Info("Using thumb directory:{0}", _imageDirectory); - Log.Info("Downloading images"); - _imageLocationList.Clear(); - _imagesDone = false; - _stopDownload = false; - //List<String> imageList = (List<String>)e.Argument; - //NameValueCollection imgNameUrlList = (NameValueCollection)e.Argument; - Object [] loArguments = (Object [])e.Argument; - GUIFacadeControl facadeView = (GUIFacadeControl)loArguments[0]; - List<String> loImageUrlList = (List<String>) loArguments[1]; - String lsThumbLocation = (String)loArguments[2]; - - - Log.Info("OnlineVideos thumbnails will be saved in {0}",lsThumbLocation); - //int liSelectedIndex = Convert.ToInt32(loArguments[2]); - int liIdx = 0; - //List<String> loImageFileList = new List<String>(loImageUrlList.Count); - WebClient client = new WebClient(); + // using (WaitCursor cursor = new WaitCursor()) + // { + // while (_imagesDone == false) + // { + // GUIWindowManager.Process(); + // } + //} + } + + public static void DownloadImages2(object sender, DoWorkEventArgs e) + { + //Log.Info("Using thumb directory:{0}", _imageDirectory); + Log.Info("Downloading images"); + _imageLocationList.Clear(); + _imagesDone = false; + _stopDownload = false; + //List<String> imageList = (List<String>)e.Argument; + //NameValueCollection imgNameUrlList = (NameValueCollection)e.Argument; + Object [] loArguments = (Object [])e.Argument; + GUIFacadeControl facadeView = (GUIFacadeControl)loArguments[0]; + List<String> loImageUrlList = (List<String>) loArguments[1]; + String lsThumbLocation = (String)loArguments[2]; + + + Log.Info("OnlineVideos thumbnails will be saved in {0}",lsThumbLocation); + //int liSelectedIndex = Convert.ToInt32(loArguments[2]); + int liIdx = 0; + //List<String> loImageFileList = new List<String>(loImageUrlList.Count); + WebClient client = new WebClient(); - string imageLocation; - string thumbnailLocation; - string name; - foreach(String url in loImageUrlList){ - liIdx++; - if (_stopDownload) - { - Log.Info("Received Request to stop Download"); - break; - } - Log.Info("downloading image :" + url); - name = MediaPortal.Util.Utils.GetThumb(url); - //Log.Info("1)lsThumb = "+lsThumb); - name = System.IO.Path.GetFileNameWithoutExtension(name); - imageLocation = lsThumbLocation + name + "L.jpg"; - thumbnailLocation = lsThumbLocation + name + ".jpg"; - if (System.IO.File.Exists(thumbnailLocation) == false) - { - client.DownloadFile(url, imageLocation); - if (System.IO.File.Exists(thumbnailLocation) == false) - { - //int iRotate = dbs.GetRotation(imageLocation); - MediaPortal.Util.Picture.CreateThumbnail(imageLocation, thumbnailLocation, (int)Thumbs.ThumbResolution, (int)Thumbs.ThumbResolution, 0); - System.Threading.Thread.Sleep(25); - System.IO.File.Delete(imageLocation); - } - - } - _imageLocationList.Add(thumbnailLocation); - facadeView[liIdx].RetrieveArt = true; - facadeView[liIdx].RefreshCoverArt(); - //i++; + string imageLocation; + string thumbnailLocation; + string name; + foreach(String url in loImageUrlList){ + liIdx++; + if (_stopDownload) + { + Log.Info("Received Request to stop Download"); + break; + } + + name = MediaPortal.Util.Utils.GetThumb(url); + //Log.Info("1)lsThumb = "+lsThumb); + name = System.IO.Path.GetFileNameWithoutExtension(name); + imageLocation = lsThumbLocation + name + "L.jpg"; + thumbnailLocation = lsThumbLocation + name + ".jpg"; + if (System.IO.File.Exists(thumbnailLocation) == false) + { + Log.Info("downloading image :" + url); + client.DownloadFile(url, imageLocation); + if (System.IO.File.Exists(thumbnailLocation) == false) + { + //int iRotate = dbs.GetRotation(imageLocation); + MediaPortal.Util.Picture.CreateThumbnail(imageLocation, thumbnailLocation, (int)Thumbs.ThumbResolution, (int)Thumbs.ThumbResolution, 0); + System.Threading.Thread.Sleep(25); + System.IO.File.Delete(imageLocation); + } + + } + _imageLocationList.Add(thumbnailLocation); + facadeView[liIdx].RetrieveArt = true; + facadeView[liIdx].RefreshCoverArt(); + //i++; - } - Log.Info("Setting imagesDone to true"); - _imagesDone = true; - } - - } + } + Log.Info("Setting imagesDone to true"); + _imagesDone = true; + } + + } } Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesTrailerUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesTrailerUtil.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesTrailerUtil.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -25,30 +25,59 @@ } public override List<GUIOnlineVideos.VideoInfo> getVideoList(String fsUrl) { - BackgroundWorker worker = new BackgroundWorker(); - worker.DoWork += new DoWorkEventHandler(HDTrailerPlugin.AppleTrailers.GetAppleTrailersRSS); - AppleTrailers._workerCompleted = false; - worker.RunWorkerAsync(fsUrl); - using (WaitCursor cursor = new WaitCursor()) - { - while (HDTrailerPlugin.AppleTrailers._workerCompleted == false) - GUIWindowManager.Process(); - } List<GUIOnlineVideos.VideoInfo> loListItems = new List<GUIOnlineVideos.VideoInfo>(); - GUIOnlineVideos.VideoInfo loItem; - foreach (ITMSClient.TrailerInfo trailer in HDTrailerPlugin.AppleTrailers.trailers) - { - loItem = new GUIOnlineVideos.VideoInfo(); - loItem.Title = trailer.Title; - if(trailer.PosterUrl!=null) - loItem.ImageUrl = trailer.PosterUrl.ToString(); - loItem.Description = trailer.Overview; - loItem.VideoUrl = trailer.Url.ToString(); - loItem.Other = trailer; - //loItem.Length = trailer.. - loListItems.Add(loItem); + if(fsUrl.StartsWith("%")){ + if(fsUrl.Length == 1){ + loListItems = getAllTrailers(); + loListItems.Sort(delegate(GUIOnlineVideos.VideoInfo v1, GUIOnlineVideos.VideoInfo v2) { return v1.Title.CompareTo(v2.Title); }); + }else{ + fsUrl = fsUrl.Substring(1); + loListItems = search(fsUrl); + } + }else{ + /* + BackgroundWorker worker = new BackgroundWorker(); + worker.DoWork += new DoWorkEventHandler(HDTrailerPlugin.AppleTrailers.GetAppleTrailersRSS); + AppleTrailers._workerCompleted = false; + worker.RunWorkerAsync(fsUrl); + using (WaitCursor cursor = new WaitCursor()) + { + while (HDTrailerPlugin.AppleTrailers._workerCompleted == false) + GUIWindowManager.Process(); + } + */ + DownloadTrailers(fsUrl); + GUIOnlineVideos.VideoInfo loItem; + foreach (ITMSClient.TrailerInfo trailer in HDTrailerPlugin.AppleTrailers.trailers) + { + + loItem = new GUIOnlineVideos.VideoInfo(); + loItem.Title = trailer.Title; + if(trailer.PosterUrl!=null) + loItem.ImageUrl = trailer.PosterUrl.ToString(); + + loItem.Tags = trailer.Genre; + /* + try{ + ITMSClient.TrailerInfo trailerMore = AppleTrailers.ProcessTrailer(trailer); + loItem.Description = trailerMore.Overview; + Log.Info("trailer desc set="+(String.IsNullOrEmpty(loItem.Description)==false)); + + loItem.VideoUrl = trailerMore.TrailerStreamCollection[0].Uri.ToString(); + //foreach(TrailerStream stream in trailerMore.TrailerStreamCollection){ + //Log.Info("Trailer stream type:{0} url:{1} size:{2}",stream.Type,stream.Uri,stream.Size); + //} + //loItem.Other = trailer; + //loItem.Length = trailer.. + */ + loListItems.Add(loItem); + /* + }catch(Exception e){ + Log.Debug("skipped {0}. Unable to parse video url out of {1}",trailer.Title, trailer.Url); + } + */ + } } - return loListItems; } @@ -59,40 +88,36 @@ trailer = AppleTrailers.ProcessTrailer(trailer); return trailer.TrailerStreamCollection[0].Uri.ToString(); } - private List<GUIOnlineVideos.VideoInfo> search(String fsQuery){ + public List<GUIOnlineVideos.VideoInfo> getAllTrailers(){ + GUIOnlineVideos.VideoInfo loItem; Dictionary<string, GUIOnlineVideos.RssLink> loRssList= OnlineVideoSettings.getInstance().moSiteList[getSiteId()].RssList; List<GUIOnlineVideos.VideoInfo> loListItems = new List<GUIOnlineVideos.VideoInfo>(); - GUIOnlineVideos.VideoInfo loItem; foreach(GUIOnlineVideos.RssLink link in loRssList.Values){ + if(link.url.StartsWith("%")){ + continue; + } + //Log.Info("searching link:{0}",link.name); - BackgroundWorker worker = new BackgroundWorker(); - worker.DoWork += new DoWorkEventHandler(HDTrailerPlugin.AppleTrailers.GetAppleTrailersRSS); - AppleTrailers._workerCompleted = false; - worker.RunWorkerAsync(link.url); + DownloadTrailers(link.url); Dictionary<string, string> loTrailersFound = new Dictionary<string,string>(); - using (WaitCursor cursor = new WaitCursor()) - { - while (HDTrailerPlugin.AppleTrailers._workerCompleted == false) - GUIWindowManager.Process(); - } foreach (ITMSClient.TrailerInfo trailer in HDTrailerPlugin.AppleTrailers.trailers) { - if(trailer.Title.Contains(fsQuery)){ - if(loTrailersFound.ContainsKey(trailer.Title) == false){ - loTrailersFound.Add(trailer.Title, ""); - loItem = new GUIOnlineVideos.VideoInfo(); - loItem.Title = trailer.Title; - if(trailer.PosterUrl!=null){ - loItem.ImageUrl = trailer.PosterUrl.ToString(); - } - loItem.Description = trailer.Overview; - loItem.VideoUrl = trailer.Url.ToString(); - loItem.Other = trailer; - //loItem.Length = trailer.. - loListItems.Add(loItem); + + if(loTrailersFound.ContainsKey(trailer.Title) == false){ + loTrailersFound.Add(trailer.Title.ToUpper(), ""); + loItem = new GUIOnlineVideos.VideoInfo(); + loItem.Title = trailer.Title; + if(trailer.PosterUrl!=null){ + loItem.ImageUrl = trailer.PosterUrl.ToString(); } + loItem.Description = trailer.Overview; + loItem.VideoUrl = trailer.Url.ToString(); + loItem.Other = trailer; + //loItem.Length = trailer.. + loListItems.Add(loItem); } + } @@ -100,5 +125,36 @@ return loListItems; } + private List<GUIOnlineVideos.VideoInfo> search(String fsQuery){ + fsQuery = fsQuery.ToUpper(); + + List<GUIOnlineVideos.VideoInfo>loAllTrailers = getAllTrailers(); + List<GUIOnlineVideos.VideoInfo>loSearchResult = loAllTrailers.FindAll(delegate(GUIOnlineVideos.VideoInfo v1) { return v1.Title.ToUpper().Contains(fsQuery);}); + + return loSearchResult; + } + private void DownloadTrailers(String fsLink){ + + //Log.Info("getting trailers from url:"+fsLink.url); + BackgroundWorker worker = new BackgroundWorker(); + worker.DoWork += new DoWorkEventHandler(HDTrailerPlugin.AppleTrailers.GetAppleTrailersRSS); + AppleTrailers._workerCompleted = false; + + worker.RunWorkerAsync(fsLink); + DateTime startTime = DateTime.Now; + TimeSpan duration = new TimeSpan(); + using (WaitCursor cursor = new WaitCursor()) + { + + while (HDTrailerPlugin.AppleTrailers._workerCompleted == false && duration.TotalSeconds < 10){ + //Log.Info("donwload trailer duration = {0} seconds",duration.TotalSeconds); + GUIWindowManager.Process(); + duration = DateTime.Now - startTime;; + + } + } + + //Log.Info("finished getting trailers from url:"+fsLink.url); + } } } Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/AppleTrailers.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/AppleTrailers.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/AppleTrailers.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -61,22 +61,27 @@ // mediaportal.xml public static string server = string.Empty; - + public void HandleHttpError(object sender, ITMSClient.HTTPErrorEventArgs e){ + + } public static void GetAppleTrailersRSS(object sender, DoWorkEventArgs e) { _workerCompleted = false; + //.+=new ITMSClient.HTTPErrorEventHandler(HandleHttpError); + //loListItem.OnItemSelected+= new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnVideoItemSelected); string xmlurl = e.Argument.ToString(); trailers.Clear(); Uri pageUri = new Uri(xmlurl); ITMSClient.ITMSContent xmlContent = ITMSClient.ITMSHelper.GetITMSPage(pageUri); - //Console.WriteLine(xmlContent.Xml); + Log.Info(xmlContent.Xml); if (xmlContent.IsValid) { + Log.Info("xml is valid"); ITMSClient.TrailerIndex indexPage = new ITMSClient.TrailerIndex("test", xmlContent); RSSTitle = "Apple HD Trailers"; //trailers.Add(indexPage.TrailerInfoCollection.); - Log.Info("FOund {0} trailers.", indexPage.TrailerInfoCollection.Count); + //Log.Info("FOund {0} trailers.", indexPage.TrailerInfoCollection.Count); foreach (ITMSClient.TrailerInfo trailerInfo in indexPage.TrailerInfoCollection) { /* @@ -115,7 +120,7 @@ { ITMSClient.TrailerInfo trailerInfo = (ITMSClient.TrailerInfo)obj; - Log.Info("Processing Trailer {0}",trailerInfo.Title); + //Log.Info("Processing Trailer {0}",trailerInfo.Title); // Lookup the trailer in the media library string key = trailerInfo.Title.GetHashCode().ToString(); // Populate the rest of the meta data Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsContent.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsContent.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsContent.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -21,10 +21,10 @@ /// <param name="Xml">Xml.</param> public ITMSContent(HttpWebResponse response, string Xml) { - MediaPortal.GUI.Library.Log.Info("creating ITMSContent"); + //MediaPortal.GUI.Library.Log.Info("creating ITMSContent"); _webResponse = response; _xml = Xml; - MediaPortal.GUI.Library.Log.Info("Finished creating ITMSContent"); + //MediaPortal.GUI.Library.Log.Info("Finished creating ITMSContent"); } /// <summary> Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsHelper.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsHelper.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/ItmsHelper.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -47,7 +47,7 @@ /// <returns></returns> static public TrailerInfo PopulateTrailerDetails(TrailerInfo trailerInfo, ITMSClient.TrailerSize desiredSize) { - Log.Info("Populating Trailer details for {0}", trailerInfo.Title); + //Log.Info("Populating Trailer details for {0}", trailerInfo.Title); string[] MONTHS = new string[]{"January","February","March","April","May","June","July","August","September","October","November","December"}; //const string DIRECTOR = "(dir.)"; Match fields; @@ -62,7 +62,7 @@ fields = RegexParsers.moviedetailsRegex1.Match(infoPage.Xml); if (fields.Success) { - Log.Info("got the movie details for {0}",trailerInfo.Title); + //Log.Info("got the movie details for {0}",trailerInfo.Title); trailerInfo.Title = fields.Groups["title"].Value.Replace('\u0092', '\'').Replace('\u0093', '"').Replace('\u0094', '"'); trailerInfo.PosterUrl = new Uri(fields.Groups["poster"].Value); trailerInfo.Copyright = fields.Groups["copyright"].Value; @@ -139,7 +139,7 @@ { foreach (Capture url in fields.Groups["urls"].Captures) { - Log.Info("Found stream url:{0}", url); + //Log.Info("Found stream url:{0}", url); TrailerStreamCollection tsc = GetTrailerStreamCollection(new Uri(infoPage.WebResponse.ResponseUri, url.Value)); TrailerStream myStream = GetDesiredTrailerStream(tsc, desiredSize); trailerInfo.TrailerStreamCollection.Add(myStream); @@ -198,8 +198,8 @@ HttpWebResponse response = null; ITMSContent content = null; - Debug.WriteLine("GetITMSPage: " + uri.AbsoluteUri); - Log.Info("GetITMSPage: " + uri.AbsoluteUri); + Log.Debug("GetITMSPage: " + uri.AbsoluteUri); + //Log.Info("GetITMSPage: " + uri.AbsoluteUri); try { request = (HttpWebRequest) HttpWebRequest.Create(uri); @@ -211,33 +211,35 @@ if (ifModifiedSince != DateTime.MinValue) request.IfModifiedSince = ifModifiedSince; - Log.Info("getiing request response"); + //Log.Info("getiing request response"); response = (HttpWebResponse) request.GetResponse(); - Log.Info("got response"); + //Log.Info("got response"); sReader = new StreamReader(response.GetResponseStream(), System.Text.Encoding.UTF8, false, (int) Math.Abs(response.ContentLength)); - Log.Info("Got Response Stream"); + //Log.Info("Got Response Stream"); - Log.Info("Download xml"); + //Log.Info("Download xml"); content = new ITMSContent(response, HttpUtility.HtmlDecode( sReader.ReadToEnd())); Log.Info("created ITMSContent"); - //Debug.WriteLine(response.LastModified); + //Log.Debug(response.LastModified); } catch (WebException ex) { - Debug.WriteLine(ex.GetBaseException().Message); + Log.Debug(ex.GetBaseException().Message); content = new ITMSContent(ex); if (ex.Response is HttpWebResponse) { HttpWebResponse httpResponse = ex.Response as HttpWebResponse; if (httpResponse.StatusCode == HttpStatusCode.NotModified) { - Debug.WriteLine(uri.AbsoluteUri + " not modified since " + ifModifiedSince); + Log.Debug(uri.AbsoluteUri + " not modified since " + ifModifiedSince); content = new ITMSContent(response, String.Empty); } } + }catch(Exception e){ + Log.Error(e); } finally { @@ -258,7 +260,7 @@ /// <returns></returns> private static TrailerStream GetDesiredTrailerStream(TrailerStreamCollection trailerStreams, TrailerSize desiredSize) { - Log.Info("getting desired Trailer size of {0}", desiredSize); + //Log.Info("getting desired Trailer size of {0}", desiredSize); // Find the largest desired size supported by the available streams while (trailerStreams.ContainsKey(desiredSize) == false && desiredSize > 0) desiredSize = desiredSize - 1; @@ -281,7 +283,7 @@ } } */ - Log.Info("Finished getting desired trailer"); + //Log.Info("Finished getting desired trailer"); return stream; } @@ -317,9 +319,9 @@ { TrailerSize size = (TrailerSize) Enum.Parse(typeof(TrailerSize), m.Groups["size"].Value, true); - Log.Info("found size {0}",size); + //Log.Info("found size {0}",size); Uri uri = new Uri(trailerPage.WebResponse.ResponseUri, m.Groups["url"].Value); - Log.Info("found url {0}", uri.ToString()); + //Log.Info("found url {0}", uri.ToString()); TrailerStream ts = new TrailerStream(size, uri); ts.Length = length; ts.Type = type; Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/TrailerIndex.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/TrailerIndex.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/ItunesUtils/TrailerIndex.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -21,6 +21,7 @@ using System.Text.RegularExpressions; using System.Net; using System.Diagnostics; +using MediaPortal.GUI.Library; namespace ITMSClient { @@ -110,6 +111,7 @@ /// </summary> protected void ParseIndexPage() { + Log.Info("Parsing index page"); MatchCollection movieItemCollection = RegexParsers.indexDetailsRegex.Matches(Content.Xml); _trailers = new TrailerInfoCollection(movieItemCollection.Count); Debug.Assert(movieItemCollection.Count > 0, "No movies found in index page xml"); Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/Main.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/Main.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/Main.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -30,9 +30,11 @@ - SiteUtilBase loUtil = new YouTubeUtil(); + //SiteUtilBase loUtil = new YouTubeUtil(); //List<GUIOnlineVideos.VideoInfo> loList = loUtil.getVideoList("http://youtube.com/rss/global/top_rated.rss"); + SiteUtilBase loUtil = new ItunesTrailerUtil(); + List<GUIOnlineVideos.VideoInfo> loList = loUtil.getVideoList("%transformers"); /* @@ -84,9 +86,9 @@ List<GUIOnlineVideos.VideoInfo> loList = loUtil.getVideoList("http://stage6.divx.com/rss/videos/order:rating"); */ //Console.WriteLine(loUtil.getUrl(loList[0].VideoUrl)); - //foreach(GUIOnlineVideos.VideoInfo loVideoInfo in loList){ -// Console.WriteLine("title:{0} \nurl:{1} \nimage:{2}",loVideoInfo.Title,loVideoInfo.VideoUrl, loVideoInfo.ImageUrl); -// } + foreach(GUIOnlineVideos.VideoInfo loVideoInfo in loList){ + Console.WriteLine("title:{0} \nurl:{1} \nimage:{2}",loVideoInfo.Title,loVideoInfo.VideoUrl, loVideoInfo.ImageUrl); + } //YouTubeUtil youtube = new YouTubeUtil(); //youtube.username = "MepoPlugin"; //youtube.password = "mepo"; Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -80,8 +80,10 @@ db.addFavoriteVideo(foVideo,fsSiteId); } - public virtual bool removeFavorite(String fsId,String fsUserName,String fsPassword){ - return false; + public virtual bool RemoveFavorite(GUIOnlineVideos.VideoInfo foVideo){ + Log.Info("SiteUtilBase removeFavorites."); + FavoritesDatabase db = FavoritesDatabase.getInstance(); + return db.removeFavoriteVideo(foVideo); } public virtual String getUrl(GUIOnlineVideos.VideoInfo video,GUIOnlineVideos.Site foSite) @@ -111,8 +113,13 @@ RssItem loRssItem; //GUIListItem loListItem; MediaContent loMediaContent; + int itemCount = 0; foreach (XmlNode chileNode in nodeList) { + if(itemCount>=100){ + break; + } + itemCount++; loRssItem = new RssItem(); for (int i = 0; i < chileNode.ChildNodes.Count; i++) Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/YouTubeUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/YouTubeUtil.cs 2007-08-22 15:01:30 UTC (rev 856) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/YouTubeUtil.cs 2007-08-22 23:07:31 UTC (rev 857) @@ -392,6 +392,7 @@ return token; } + /* public override bool removeFavorite(string fsVideoId, string fsUserName, string fsPassword) { if (isLoggedIn()==false){ @@ -421,13 +422,16 @@ RequestStream.Write(PostData, 0, PostData.Length); RequestStream.Close(); */ + /* HttpWebResponse response = (HttpWebResponse)Request.GetResponse(); StreamReader Reader = new StreamReader(response.GetResponseStream()); String lsResponse = Reader.ReadToEnd(); Console.WriteLine(lsResponse); response.Close(); return true; + } + */ public override string getSiteId() { return "1"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |