From: <j_b...@us...> - 2008-12-24 18:12:59
|
Revision: 2466 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2466&view=rev Author: j_burnette Date: 2008-12-24 18:12:50 +0000 (Wed, 24 Dec 2008) Log Message: ----------- Added Paths: ----------- trunk/plugins/mpUsenet/ trunk/plugins/mpUsenet/mpUsenet/ trunk/plugins/mpUsenet/mpUsenet/Clients/ trunk/plugins/mpUsenet/mpUsenet/Clients/AltBinz.cs trunk/plugins/mpUsenet/mpUsenet/Clients/IClient.cs trunk/plugins/mpUsenet/mpUsenet/Clients/SABnzbd.cs trunk/plugins/mpUsenet/mpUsenet/Properties/ trunk/plugins/mpUsenet/mpUsenet/Properties/AssemblyInfo.cs trunk/plugins/mpUsenet/mpUsenet/Sites/ trunk/plugins/mpUsenet/mpUsenet/Sites/Newzbin.cs trunk/plugins/mpUsenet/mpUsenet/Sites/NzbMatrix.cs trunk/plugins/mpUsenet/mpUsenet/bin/ trunk/plugins/mpUsenet/mpUsenet/bin/Debug/ trunk/plugins/mpUsenet/mpUsenet/bin/Debug/AxInterop.WMPLib.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Bass.Net.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/BassRegistration.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Core.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Dialogs.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/DirectShowLib.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/ICSharpCode.SharpZipLib.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Interop.WMPLib.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/MediaPortal.Support.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Utils.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/edtftpnet-1.2.2.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/mpUsenet.dll trunk/plugins/mpUsenet/mpUsenet/bin/Debug/mpUsenet.pdb trunk/plugins/mpUsenet/mpUsenet/bin/Debug/taglib-sharp.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/ trunk/plugins/mpUsenet/mpUsenet/bin/Release/AxInterop.WMPLib.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/Bass.Net.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/BassRegistration.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/CSScriptLibrary.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/Core.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/Databases.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/Dialogs.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/DirectShowLib.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/ICSharpCode.SharpZipLib.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/Interop.WMPLib.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/MediaPortal.Support.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/Utils.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/edtftpnet-1.2.2.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/mpUsenet.dll trunk/plugins/mpUsenet/mpUsenet/bin/Release/mpUsenet.pdb trunk/plugins/mpUsenet/mpUsenet/bin/Release/taglib-sharp.dll trunk/plugins/mpUsenet/mpUsenet/config.Designer.cs trunk/plugins/mpUsenet/mpUsenet/config.cs trunk/plugins/mpUsenet/mpUsenet/config.resx trunk/plugins/mpUsenet/mpUsenet/mpUsenet.csproj trunk/plugins/mpUsenet/mpUsenet/mpUsenetGUI.cs trunk/plugins/mpUsenet/mpUsenet/obj/ trunk/plugins/mpUsenet/mpUsenet/obj/Debug/ trunk/plugins/mpUsenet/mpUsenet/obj/Debug/Refactor/ trunk/plugins/mpUsenet/mpUsenet/obj/Debug/ResolveAssemblyReference.cache trunk/plugins/mpUsenet/mpUsenet/obj/Debug/TempPE/ trunk/plugins/mpUsenet/mpUsenet/obj/Debug/mpUsenet.dll trunk/plugins/mpUsenet/mpUsenet/obj/Debug/mpUsenet.pdb trunk/plugins/mpUsenet/mpUsenet/obj/Release/ trunk/plugins/mpUsenet/mpUsenet/obj/Release/Refactor/ trunk/plugins/mpUsenet/mpUsenet/obj/Release/ResolveAssemblyReference.cache trunk/plugins/mpUsenet/mpUsenet/obj/Release/TempPE/ trunk/plugins/mpUsenet/mpUsenet/obj/Release/mpUsenet.config.resources trunk/plugins/mpUsenet/mpUsenet/obj/Release/mpUsenet.csproj.GenerateResource.Cache trunk/plugins/mpUsenet/mpUsenet/obj/Release/mpUsenet.dll trunk/plugins/mpUsenet/mpUsenet/obj/Release/mpUsenet.pdb trunk/plugins/mpUsenet/mpUsenet/obj/mpUsenet.csproj.FileListAbsolute.txt trunk/plugins/mpUsenet/mpUsenet/tvseriesTools.cs trunk/plugins/mpUsenet/mpUsenet.sln trunk/plugins/mpUsenet/mpUsenet.suo Added: trunk/plugins/mpUsenet/mpUsenet/Clients/AltBinz.cs =================================================================== --- trunk/plugins/mpUsenet/mpUsenet/Clients/AltBinz.cs (rev 0) +++ trunk/plugins/mpUsenet/mpUsenet/Clients/AltBinz.cs 2008-12-24 18:12:50 UTC (rev 2466) @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using System.IO; +using MediaPortal.ServiceImplementations; + +namespace mpUsenet.Clients +{ + class AltBinz:IClient + { + string _path; + int _maxSpeed; + + public AltBinz(string path, int maxSpeed) + { + _path = path; + _maxSpeed = maxSpeed; + } + + #region IClient Members + + public clientStatus getStatus() + { + clientStatus status = new clientStatus(); + try + { + if (!File.Exists(_path + "altbinz_status.xml")) + { + status.isAccessible = false; + return status; + } + + XmlDocument xml = new XmlDocument(); + xml.Load(XmlReader.Create(_path + "altbinz_status.xml")); + + status.queueRemaining = xml.SelectSingleNode("/altbinz/QueueSize").InnerText; + status.kbpersec = xml.SelectSingleNode("/altbinz/CurrentSpeed").InnerText.Replace("kb/s", ""); + status.queuetimeRemaining = xml.SelectSingleNode("/altbinz/ETA").InnerText; + status.targetDriveSpace = xml.SelectSingleNode("/altbinz/FreeSpace").InnerText; + status.isAccessible = true; + return status; + } + catch (FileNotFoundException) + { + Log.Error("mpUsenet - altbinz_status.xml not found. Expected file to be located at {0}. Ensure you have checked 'Enable status in XML file' in alt.binz Setup -> Miscellaneous #2 ", _path); + status.isAccessible = false; + return status; + } + catch (Exception e) + { + Log.Error("mpUsenet - Error reading alt.binz status file."); + Log.Error(e.ToString()); + status.isAccessible = false; + return status; + } + + } + + public bool Pause() + { + return false; + } + + public bool Resume() + { + return false; + } + + public bool supportsPause + { + get { return false; } + } + + public bool supportsStatus + { + get { return true; } + } + + #endregion + } +} Added: trunk/plugins/mpUsenet/mpUsenet/Clients/IClient.cs =================================================================== --- trunk/plugins/mpUsenet/mpUsenet/Clients/IClient.cs (rev 0) +++ trunk/plugins/mpUsenet/mpUsenet/Clients/IClient.cs 2008-12-24 18:12:50 UTC (rev 2466) @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace mpUsenet.Clients +{ + interface IClient + { + clientStatus getStatus(); + bool Pause(); + bool Resume(); + bool supportsPause + { + get; + } + + } +} Added: trunk/plugins/mpUsenet/mpUsenet/Clients/SABnzbd.cs =================================================================== --- trunk/plugins/mpUsenet/mpUsenet/Clients/SABnzbd.cs (rev 0) +++ trunk/plugins/mpUsenet/mpUsenet/Clients/SABnzbd.cs 2008-12-24 18:12:50 UTC (rev 2466) @@ -0,0 +1,261 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Net; +using System.Xml; +using MediaPortal.ServiceImplementations; + +namespace mpUsenet.Clients +{ + class SABnzbd:IClient + { + string _host; + string _port; + int _maxSpeed; + string _username; + string _password; + + public bool supportsPause + { + get { return true; } + } + + + public SABnzbd(string host, string port, string username, string password, int maxSpeed) + { + _host = host; + _port = port; + _maxSpeed = maxSpeed; + _username = username; + _password = password; + } + + public clientStatus getStatus() + { + + UriBuilder uri = new UriBuilder(); + uri.Host = _host; + int intPort; + if (!int.TryParse(_port, out intPort)) + return new clientStatus(); + uri.Port = intPort; + uri.Path = "sabnzbd/api"; + uri.Query = "mode=qstatus&output=xml"; + XmlDocument statusXML = new XmlDocument(); + WebClient client = new WebClient(); + clientStatus _status = new clientStatus(); + string response; + try + { + // Log.Info("trying connection"); + response = client.DownloadString(uri.Uri); + } + catch + { + // Log.Info("no connection"); + _status.isAccessible = false; + return _status; + } + // Log.Info("connected"); + _status.isAccessible = true; + statusXML.LoadXml(response); + + if (statusXML.SelectSingleNode("/queue/paused").InnerText == "True") + _status.paused = true; + else _status.paused = false; + + _status.kbpersec = statusXML.SelectSingleNode("/queue/kbpersec").InnerText; + + if (_status.kbpersec.Contains(".")) + _status.kbpersec = _status.kbpersec.Remove(_status.kbpersec.IndexOf(".")); + _status.speedPercentage = (Math.Round(decimal.Parse(_status.kbpersec) / _maxSpeed * 100, 0)).ToString(); + + _status = getCurrJob(statusXML, _status); + + + _status.queueTotalSize = statusXML.SelectSingleNode("/queue/mb").InnerText; + if (_status.queueTotalSize.Contains(".")) + _status.queueTotalSize = _status.queueTotalSize.Remove(_status.queueTotalSize.IndexOf(".")); + _status.queueRemaining = statusXML.SelectSingleNode("/queue/mbleft").InnerText; + if (_status.queueRemaining.Contains(".")) + _status.queueRemaining = _status.queueRemaining.Remove(_status.queueRemaining.IndexOf(".")); + + + _status.tempDriveSpace = statusXML.SelectSingleNode("/queue/diskspace1").InnerText; + _status.tempDriveSpace = Math.Round(double.Parse(_status.tempDriveSpace), 0).ToString(); + _status.targetDriveSpace = statusXML.SelectSingleNode("/queue/diskspace2").InnerText; + _status.targetDriveSpace = Math.Round(double.Parse(_status.targetDriveSpace), 0).ToString(); + _status.queuetimeRemaining = statusXML.SelectSingleNode("/queue/timeleft").InnerText; + _status.overview = createOverview(_status); + + return _status; + + + } + + public bool Pause() + { + UriBuilder uri = new UriBuilder(); + uri.Host = _host; + int intPort; + if (!int.TryParse(_port, out intPort)) + return false; + uri.Port = intPort; + uri.Path = "sabnzbd/api"; + uri.Query = "mode=pause"; + // XmlDocument statusXML = new XmlDocument(); + WebClient client = new WebClient(); + string response; + try + { + // Log.Info("trying connection"); + response = client.DownloadString(uri.Uri); + } + catch + { + + return false; + } + return true; + } + + public bool Resume() + { + UriBuilder uri = new UriBuilder(); + uri.Host = _host; + int intPort; + if (!int.TryParse(_port, out intPort)) + return false; + uri.Port = intPort; + uri.Path = "sabnzbd/api"; + uri.Query = "mode=resume"; + WebClient client = new WebClient(); + string response; + try + { + response = client.DownloadString(uri.Uri); + } + catch + { + + return false; + } + return true; + + } + + clientStatus getCurrJob(XmlDocument statusXML,clientStatus _status) + { + // Log.Info("getting current jobs"); + try + { + if (statusXML.SelectSingleNode("/queue/jobs/job") != null) + { + XmlNode job = statusXML.SelectSingleNode("/queue/jobs/job"); + _status.jobFilename = job.SelectSingleNode("filename").InnerText; + _status.jobSizeRemaining = job.SelectSingleNode("mbleft").InnerText; + _status.jobTotalSize = job.SelectSingleNode("mb").InnerText; + if (_status.jobTotalSize == "0") + _status.jobPercentage = "0"; + else + _status.jobPercentage = (Math.Round((decimal.Parse(_status.jobTotalSize) - decimal.Parse(_status.jobSizeRemaining)) + / decimal.Parse(_status.jobTotalSize) * 100, 0)).ToString(); + if (_status.jobTotalSize.Contains(".")) + _status.jobTotalSize = _status.jobTotalSize.Remove(_status.jobTotalSize.IndexOf(".")); + if (_status.jobSizeRemaining.Contains(".")) + _status.jobSizeRemaining = _status.jobSizeRemaining.Remove(_status.jobSizeRemaining.IndexOf(".")); + + if (_status.jobPercentage != "0" && _status.kbpersec != "0") + { + string minutes = ((int.Parse(_status.jobSizeRemaining) * 1024) / int.Parse(_status.kbpersec) / 60).ToString(); + string seconds = ((int.Parse(_status.jobSizeRemaining) * 1024) / int.Parse(_status.kbpersec) % 60).ToString(); + if (seconds.Length == 1) seconds = "0" + seconds; + _status.jobtimeRemaining = minutes + ":" + seconds; + } + else + _status.jobtimeRemaining = "0:00"; + + // Log.Info("returning jobs"); + return _status; + } + + _status.jobFilename = "Nothing"; + _status.jobSizeRemaining = "0"; + _status.jobTotalSize = "0"; + _status.jobPercentage = "0"; + _status.jobtimeRemaining = "0:00"; + } + catch (Exception e) + { + Log.Error("mpUsenet - Error parsing SABnzbd jobs."); + Log.Error(e.ToString()); + } + return _status; + } + + string createOverview(clientStatus _status) + { + try + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("Downloading: " + _status.jobFilename); + sb.AppendLine("Speed: " + _status.kbpersec); + sb.AppendLine("Amount Left: " + _status.jobSizeRemaining); + sb.AppendLine("ETA: " + _status.queuetimeRemaining); + + return sb.ToString(); + } + catch { } + return "no overview"; + } + + public bool addNewzbinID(string id) + { + + UriBuilder uri = new UriBuilder(); + uri.Host = _host; + int intPort; + if (!int.TryParse(_port, out intPort)) + return false; + uri.Port = intPort; + uri.Path = "sabnzbd/api"; + uri.Query = "mode=addid&name=" + id; + // XmlDocument statusXML = new XmlDocument(); + WebClient client = new WebClient(); + string response; + try + { + // Log.Info("trying connection"); + response = client.DownloadString(uri.Uri); + } + catch + { + + return false; + } + return true; + + } + + } + + class clientStatus + { + public bool isAccessible; + public bool paused; + public string overview; + public string kbpersec; + public string jobFilename; + public string jobSizeRemaining; + public string queuetimeRemaining; + public string jobtimeRemaining; + public string queueRemaining; + public string queueTotalSize; + public string tempDriveSpace; + public string targetDriveSpace; + public string speedPercentage; + public string jobPercentage; + public string jobTotalSize; + + } +} Added: trunk/plugins/mpUsenet/mpUsenet/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/mpUsenet/mpUsenet/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/mpUsenet/mpUsenet/Properties/AssemblyInfo.cs 2008-12-24 18:12:50 UTC (rev 2466) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("mpUsenet")] +[assembly: AssemblyDescription("MediaPortal Plugin for NZB downloading")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("mpUsenet")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ac85245c-33bc-4157-a582-b356a0d88fa5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("0.1.0.0")] +[assembly: AssemblyFileVersion("0.1.0.0")] Added: trunk/plugins/mpUsenet/mpUsenet/Sites/Newzbin.cs =================================================================== --- trunk/plugins/mpUsenet/mpUsenet/Sites/Newzbin.cs (rev 0) +++ trunk/plugins/mpUsenet/mpUsenet/Sites/Newzbin.cs 2008-12-24 18:12:50 UTC (rev 2466) @@ -0,0 +1,256 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Net; +using System.Text.RegularExpressions; +using System.IO; +using MediaPortal.ServiceImplementations; + +namespace mpUsenet.Sites +{ + class Newzbin + { + string _NzbSessionID; + string _NzbSmoke; + + public Newzbin(string nzbsmoke, string nzbsessionid) + { + _NzbSessionID = nzbsessionid; + _NzbSmoke = nzbsmoke; + } + + bool refreshCookies() + { + try + { + MediaPortal.Profile.Settings settings = new MediaPortal.Profile.Settings(MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Plugins) + @"\Windows\mpUsenet.xml", false); + string user = settings.GetValue("Newzbin", "Username"); + string pass = settings.GetValue("Newzbin", "Password"); + + UriBuilder bldr = new UriBuilder("http://v3.newzbin.com"); + bldr.Path = "/account/login/"; + + HttpWebRequest cookieReq = (HttpWebRequest)HttpWebRequest.Create(bldr.Uri); + ASCIIEncoding encoding = new ASCIIEncoding(); + string postData = "ret_url=%2F&username=" + user + "&password=" + pass; + byte[] data = encoding.GetBytes(postData); + cookieReq.Method = "POST"; + cookieReq.ContentType = "application/x-www-form-urlencoded"; + cookieReq.ContentLength = data.Length; + cookieReq.AllowAutoRedirect = false; + Stream postStream = cookieReq.GetRequestStream(); + postStream.Write(data, 0, data.Length); + postStream.Close(); + + HttpWebResponse cookieRes = (HttpWebResponse)cookieReq.GetResponse(); + + string cookies = cookieRes.Headers[HttpResponseHeader.SetCookie]; + cookieRes.Close(); + cookies = cookies.Remove(0, cookies.IndexOf("=") + 1); + + string nzbsessionid = cookies; + nzbsessionid = nzbsessionid.Remove(nzbsessionid.IndexOf(";")); + + string nzbsmoke = cookies.Remove(0, cookies.IndexOf("e=") + 2); + nzbsmoke = nzbsmoke.Remove(nzbsmoke.IndexOf(";")); + + //Validate Cookies + + bldr.Path = "/account/login/cookie/"; + bldr.Query = "sid=" + nzbsessionid; + + WebClient client = new WebClient(); + client.Headers.Set("Cookie", "NzbSessionID=" + nzbsessionid + "; NzbSmoke=" + nzbsmoke + "\r\n"); + + client.DownloadString(bldr.Uri); + cookies = client.ResponseHeaders[HttpResponseHeader.SetCookie]; + cookies = cookies.Remove(0, cookies.IndexOf("=") + 1); + + nzbsessionid = cookies; + nzbsessionid = nzbsessionid.Remove(nzbsessionid.IndexOf(";")); + _NzbSessionID = nzbsessionid; + + nzbsmoke = cookies.Remove(0, cookies.IndexOf("e=") + 2); + nzbsmoke = nzbsmoke.Remove(nzbsmoke.IndexOf(";")); + _NzbSmoke = nzbsmoke; + + settings.SetValue("Newzbin", "NzbSmoke", nzbsmoke); + settings.SetValue("Newzbin", "NzbSessionID", nzbsessionid); + settings.Dispose(); + + return true; + } + catch (Exception e) + { + Log.Error(e.ToString()); + return false; + } + + } + + public List<nzbItem> getItems(string cat, string page) + { + List<nzbItem> items = new List<nzbItem>(); + try + { + WebClient client = new WebClient(); + client.Headers.Set("Cookie", "NzbSessionID=" + _NzbSessionID + "; NzbSmoke=" + _NzbSmoke + "\r\n"); + string rawHTML; + rawHTML = client.DownloadString("http://v3.newzbin.com/browse/category/p/" + cat + "/?page=" + page); + if (rawHTML.Contains("You need an account to proceed.")) + { + MediaPortal.ServiceImplementations.Log.Info("mpUsenet - Newzbin cookies need refreshed."); + if (refreshCookies()) + { + MediaPortal.ServiceImplementations.Log.Info("mpUsenet - Newzbin cookies refreshed. nzbsmoke={0} nzbsessionid={1}", _NzbSmoke, _NzbSessionID); + client.Headers.Set("Cookie", "NzbSessionID=" + _NzbSessionID + "; NzbSmoke=" + _NzbSmoke + "\r\n"); + rawHTML = client.DownloadString("http://v3.newzbin.com/browse/category/p/" + cat + "/?page=" + page); + } + else + { + MediaPortal.ServiceImplementations.Log.Error("mpUsenet - Unable to get Newzbin cookies. Check username/password."); + return items; + } + + } + items = parseHTML(rawHTML); + return items; + } + catch (WebException e) + { + Log.Error("mpUsenet - Error connecting to Newzbin."); + Log.Error(e.ToString()); + return items; + } + catch (Exception e) + { + Log.Error("mpUsenet - Error parsing Newzbin feed."); + Log.Error(e.ToString()); + return items; + } + } + + public List<nzbItem> search(string searchString, string page) + { + List<nzbItem> items = new List<nzbItem>(); + try + { + WebClient client = new WebClient(); + client.Headers.Set("Cookie", "NzbSessionID=" + _NzbSessionID + "; NzbSmoke=" + _NzbSmoke + "\r\n"); + string rawHTML; + rawHTML = client.DownloadString("http://v3.newzbin.com/search/query/?q=" + searchString + "&area=-1&fpn=p&searchaction=Go&areadone=-1&page=" + page); + if (rawHTML.Contains("You need an account to proceed.")) + { + MediaPortal.ServiceImplementations.Log.Info("mpUsenet - Newzbin cookies need refreshed."); + if (refreshCookies()) + { + MediaPortal.ServiceImplementations.Log.Info("mpUsenet - Newzbin cookies refreshed. nzbsmoke={0} nzbsessionid={1}", _NzbSmoke, _NzbSessionID); + client.Headers.Set("Cookie", "NzbSessionID=" + _NzbSessionID + "; NzbSmoke=" + _NzbSmoke + "\r\n"); + rawHTML = client.DownloadString("http://v3.newzbin.com/search/query/?q=" + searchString + "&area=-1&fpn=p&searchaction=Go&areadone=-1&page=" + page); + } + else + { + MediaPortal.ServiceImplementations.Log.Error("mpUsenet - Unable to get Newzbin cookies. Check username/password."); + return items; + } + + } + items = parseHTML(rawHTML); + return items; + } + catch (WebException e) + { + Log.Error("mpUsenet - Error connecting to Newzbin."); + Log.Error(e.ToString()); + return items; + } + catch (Exception e) + { + Log.Error("mpUsenet - Error parsing Newzbin feed."); + Log.Error(e.ToString()); + return items; + } + } + + public bool downloadNZB(string id,string path,string filename) + { + WebClient client = new WebClient(); + client.Headers.Set("Cookie", "NzbSessionID=" + _NzbSessionID + "; NzbSmoke=" + _NzbSmoke + "\r\n"); + + try + { + client.DownloadFile("http://v3.newzbin.com/browse/post/" + id + "/nzb", path + filename + ".nzb"); + } + catch (Exception e) + { + MediaPortal.ServiceImplementations.Log.Error(e.ToString()); + return false; + } + return true; + } + + List<nzbItem> parseHTML(string raw) + { + Regex postNameAndID = new Regex("/\\d{7}/\">.*<"); + Regex postID = new Regex("\\d{7}"); + Regex postName = new Regex(">.*<"); + + //this shows up when you're an editor and have recently created reports + if (raw.Contains("<h3>Previous Reports:</h3>")) + raw = raw.Remove(raw.IndexOf("<h3>Previous Reports:</h3>")); + + MatchCollection matches = postNameAndID.Matches(raw); + + List<nzbItem> items = new List<nzbItem>(); + + foreach (System.Text.RegularExpressions.Match match in matches) + { + + nzbItem item = new nzbItem(); + item.id = postID.Match(match.Value).Value; + item.name = postName.Match(match.Value).Value; + item.name = item.name.Remove(0, 1); + item.name = item.name.Remove(item.name.Length - 1); + item.name = item.name.Replace("&", "&"); + + items.Add(item); + } + if (items.Count > 0) + items = getAttribs(raw, items); + + return items; + } + + List<nzbItem>getAttribs(string raw, List<nzbItem> items) + { + raw = raw.Remove(0, raw.IndexOf("checkbox")); + + + Regex badMatches = new Regex("<td colspan=\"3\">\\s\\t{3}<span class=\"hover\">.*?</span>", RegexOptions.Singleline); + foreach (Match badmatch in badMatches.Matches(raw)) + raw = raw.Replace(badmatch.Value, ""); + Regex attribs = new Regex("<td colspan=\"3\">\\s*.*?</td>\\s*</tr>\\s\\t</tbody>", RegexOptions.Singleline); + + Regex html = new Regex("\\s*<[^<>]+>\\s*[:;]\\s*", RegexOptions.Singleline); + Regex html2 = new Regex("\\s*<[^<>]+>", RegexOptions.Singleline); + MatchCollection matches = attribs.Matches(raw); + + for (int i = 0; i < items.Count && i < matches.Count; i++) + items[i].description = matches[i].Value; + + for (int i = 0; i < items.Count; i++) + { + foreach (Match htmlmatch in html.Matches(items[i].description)) + items[i].description = items[i].description.Replace(htmlmatch.Value, " | "); + + foreach (Match html2match in html2.Matches(items[i].description)) + items[i].description = items[i].description.Replace(html2match.Value, " "); + items[i].description = items[i].description.Trim(); + } + + return items; + + } + + } +} Added: trunk/plugins/mpUsenet/mpUsenet/Sites/NzbMatrix.cs =================================================================== --- trunk/plugins/mpUsenet/mpUsenet/Sites/NzbMatrix.cs (rev 0) +++ trunk/plugins/mpUsenet/mpUsenet/Sites/NzbMatrix.cs 2008-12-24 18:12:50 UTC (rev 2466) @@ -0,0 +1,226 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; +using System.Net; +using System.IO; +using MediaPortal.ServiceImplementations; + +namespace mpUsenet.Sites +{ + class NzbMatrix + { + string _uid; + string _pass; + + public NzbMatrix(string uid, string pass) + { + _uid = uid; + _pass = pass; + } + + bool refreshCookies() + { + try + { + MediaPortal.Profile.Settings settings = new MediaPortal.Profile.Settings(MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Plugins) + @"\Windows\mpUsenet.xml", false); + string user = settings.GetValue("NZBMatrix", "Username"); + string password = settings.GetValue("NZBMatrix", "Password"); + + UriBuilder bldr = new UriBuilder("http://nzbmatrix.com"); + bldr.Path = "/account-login.php"; + + HttpWebRequest cookieReq = (HttpWebRequest)HttpWebRequest.Create(bldr.Uri); + ASCIIEncoding encoding = new ASCIIEncoding(); + string postData = "username=" + user + "&password=" + password; + byte[] data = encoding.GetBytes(postData); + cookieReq.Method = "POST"; + cookieReq.ContentType = "application/x-www-form-urlencoded"; + cookieReq.ContentLength = data.Length; + cookieReq.AllowAutoRedirect = false; + Stream postStream = cookieReq.GetRequestStream(); + postStream.Write(data, 0, data.Length); + postStream.Close(); + + HttpWebResponse cookieRes = (HttpWebResponse)cookieReq.GetResponse(); + + string cookies = cookieRes.Headers[HttpResponseHeader.SetCookie]; + cookieRes.Close(); + string uid = cookies.Remove(cookies.IndexOf(";")); + uid = uid.Replace("uid=", ""); + _uid = uid; + string pass = cookies.Remove(0, cookies.IndexOf("pass")); + pass = pass.Remove(pass.IndexOf(";")); + pass = pass.Replace("pass=", ""); + _pass = pass; + + settings.SetValue("NZBMatrix", "uid", _uid); + settings.SetValue("NZBMatrix", "pass", _pass); + settings.Dispose(); + + return true; + } + catch (Exception e) + { + Log.Error(e.ToString()); + return false; + } + + } + + public bool downloadNZB(string id,string path, string filename) + { + //http://v3.newzbin.com/browse/post/4059023/nzb + WebClient client = new WebClient(); + client.Headers.Set("Cookie", "uid=" + _uid + "; pass=" + _pass); + + try + { + client.DownloadFile("http://nzbmatrix.com/nzb-download.php?id=" + id , path + filename + ".zip"); + } + catch (Exception e) + { + Log.Error(e.ToString()); + return false; + } + return true; + } + + public List<nzbItem> search(string searchString, string page) + { + List<nzbItem> items = new List<nzbItem>(); + try + { + WebClient client = new WebClient(); + client.Headers.Set("Cookie", "uid=" + _uid + "; pass=" + _pass); + string rawHTML; + rawHTML = client.DownloadString("http://nzbmatrix.com/nzb-search.php?search=" + searchString + "&page=" + page); + if (rawHTML.Contains("You are not logged in.")) + { + MediaPortal.ServiceImplementations.Log.Info("mpUsenet - NZBMatrix cookies need refreshed."); + if (refreshCookies() && _uid != "" && _pass != "") + { + MediaPortal.ServiceImplementations.Log.Info("mpUsenet - NZBMatrix cookies refreshed. uid={0} pass={1}", _uid, _pass); + client.Headers.Set("Cookie", "uid=" + _uid + "; pass=" + _pass); + rawHTML = client.DownloadString("http://nzbmatrix.com/nzb-search.php?search=" + searchString + "&page=" + page); + } + else + { + Log.Error("mpUsenet - Unable to get NZBMatrix cookies. Check username/password."); + return items; + } + + } + items = parseHTML(rawHTML); + return items; + } + catch (WebException e) + { + Log.Error("mpUsenet - Error connecting to NzbMatrix."); + Log.Error(e.ToString()); + return items; + } + catch (Exception e) + { + Log.Error("mpUsenet - Error searching NZBMatrix."); + Log.Error(e.ToString()); + return items; + } + } + + + public List<nzbItem> getItems(string cat, string page) + { + List<nzbItem> items = new List<nzbItem>(); + try + { + WebClient client = new WebClient(); + client.Headers.Set("Cookie", "uid=" + _uid + "; pass=" + _pass); + string rawHTML; + rawHTML = client.DownloadString("http://nzbmatrix.com/nzb.php?category=" + cat + "&page=" + page); + if (rawHTML.Contains("You are not logged in.")) + { + MediaPortal.ServiceImplementations.Log.Info("mpUsenet - NZBMatrix cookies need refreshed."); + if (refreshCookies() && _uid != "" && _pass != "") + { + MediaPortal.ServiceImplementations.Log.Info("mpUsenet - NZBMatrix cookies refreshed. uid={0} pass={1}", _uid, _pass); + client.Headers.Set("Cookie", "uid=" + _uid + "; pass=" + _pass); + rawHTML = client.DownloadString("http://nzbmatrix.com/nzb.php?category=" + cat + "&page=" + page); + } + else + { + MediaPortal.ServiceImplementations.Log.Error("mpUsenet - Unable to get NZBMatrix cookies. Check username/password."); + return items; + } + + } + items = parseHTML(rawHTML); + return items; + } + catch (WebException e) + { + Log.Error("mpUsenet - Error connecting to NzbMatrix."); + Log.Error(e.ToString()); + return items; + } + catch (Exception e) + { + Log.Error("mpUsenet - Error parsing NzbMatrix feed."); + Log.Error(e.ToString()); + return items; + } + } + + List<nzbItem> parseHTML(string raw) + { + raw = raw.Remove(0, raw.IndexOf("Show Columns")); + + Regex cats = new Regex("cat=\\d*.*?<"); + Regex ids = new Regex("download.php\\?id=\\d*\""); + Regex names = new Regex("<b><b>.*</b>"); + Regex dateSizes = new Regex("Added to Usenet: </B>.*?<BR><b> Size: </B>.*?<BR>"); + Regex html = new Regex("<[^<>]+>"); + + MatchCollection catMatches = cats.Matches(raw); + MatchCollection idsMatches = ids.Matches(raw); + MatchCollection nameMatches = names.Matches(raw); + MatchCollection dateSizeMatches = dateSizes.Matches(raw); + + List<nzbItem> items = new List<nzbItem>(); + + if (catMatches.Count == idsMatches.Count && nameMatches.Count==dateSizeMatches.Count) + { + for (int i = 0; i < catMatches.Count; i++) + { + nzbItem item = new nzbItem(); + + string cat = catMatches[i].Value; + cat = cat.Remove(0, cat.IndexOf(">") + 1); + cat = cat.Replace("<", ""); + + string id = idsMatches[i].Value; + id = id.Replace("download.php?id=", ""); + id = id.Replace("\"", ""); + + string name = nameMatches[i].Value; + name = name.Replace("<b><b>", ""); + name = name.Replace("</b></b>", ""); + + string dateSize = dateSizeMatches[i].Value; + foreach (Match htmlMatch in html.Matches(dateSize)) + dateSize = dateSize.Replace(htmlMatch.Value, ""); + dateSize = dateSize.Replace(" ", " | "); + + item.name = name; + item.description = cat + " | " + dateSize; + item.id = id; + items.Add(item); + } + + + } + + return items; + } + } +} Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/AxInterop.WMPLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/AxInterop.WMPLib.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Bass.Net.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Bass.Net.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/BassRegistration.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/BassRegistration.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Core.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Dialogs.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Dialogs.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/DirectShowLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/DirectShowLib.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/ICSharpCode.SharpZipLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/ICSharpCode.SharpZipLib.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Interop.WMPLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Interop.WMPLib.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/MediaPortal.Support.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/MediaPortal.Support.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/Utils.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/edtftpnet-1.2.2.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/edtftpnet-1.2.2.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/mpUsenet.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/mpUsenet.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/mpUsenet.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/mpUsenet.pdb ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/taglib-sharp.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Debug/taglib-sharp.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/AxInterop.WMPLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/AxInterop.WMPLib.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Bass.Net.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Bass.Net.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/BassRegistration.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/BassRegistration.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/CSScriptLibrary.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/CSScriptLibrary.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Core.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Databases.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Databases.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Dialogs.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Dialogs.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/DirectShowLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/DirectShowLib.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/ICSharpCode.SharpZipLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/ICSharpCode.SharpZipLib.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Interop.WMPLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Interop.WMPLib.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/MediaPortal.Support.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/MediaPortal.Support.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/Utils.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/edtftpnet-1.2.2.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/edtftpnet-1.2.2.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/mpUsenet.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/mpUsenet.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/mpUsenet.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/mpUsenet.pdb ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/bin/Release/taglib-sharp.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/mpUsenet/mpUsenet/bin/Release/taglib-sharp.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/mpUsenet/mpUsenet/config.Designer.cs =================================================================== --- trunk/plugins/mpUsenet/mpUsenet/config.Designer.cs (rev 0) +++ trunk/plugins/mpUsenet/mpUsenet/config.Designer.cs 2008-12-24 18:12:50 UTC (rev 2466) @@ -0,0 +1,472 @@ +namespace mpUsenet +{ + partial class config + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.nameBox = new System.Windows.Forms.TextBox(); + this.sabIPBox = new System.Windows.Forms.TextBox(); + this.SABPortBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.newzbinPassBox = new System.Windows.Forms.TextBox(); + this.newzbinUserBox = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.nzbmatrixPassBox = new System.Windows.Forms.TextBox(); + this.nzbmatrixUserBox = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.nzbBox = new System.Windows.Forms.TextBox(); + this.label12 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.label13 = new System.Windows.Forms.Label(); + this.speedBox = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.sabPassBox = new System.Windows.Forms.TextBox(); + this.sabUserBox = new System.Windows.Forms.TextBox(); + this.label18 = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + this.abFolderBox = new System.Windows.Forms.TextBox(); + this.label19 = new System.Windows.Forms.Label(); + this.clientBox = new System.Windows.Forms.ComboBox(); + this.label20 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(11, 24); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(87, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Displayed Name:"; + // + // nameBox + // + this.nameBox.Location = new System.Drawing.Point(102, 21); + this.nameBox.Name = "nameBox"; + this.nameBox.Size = new System.Drawing.Size(274, 20); + this.nameBox.TabIndex = 1; + // + // sabIPBox + // + this.sabIPBox.Location = new System.Drawing.Point(52, 184); + this.sabIPBox.Name = "sabIPBox"; + this.sabIPBox.Size = new System.Drawing.Size(100, 20); + this.sabIPBox.TabIndex = 2; + // + // SABPortBox + // + this.SABPortBox.Location = new System.Drawing.Point(203, 184); + this.SABPortBox.Name = "SABPortBox"; + this.SABPortBox.Size = new System.Drawing.Size(50, 20); + this.SABPortBox.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(26, 187); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(20, 13); + this.label2.TabIndex = 4; + this.label2.Text = "IP:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(168, 187); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(29, 13); + this.label3.TabIndex = 5; + this.label3.Text = "Port:"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(15, 156); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(71, 16); + this.label4.TabIndex = 6; + this.label4.Text = "SABnzbd"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(16, 316); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(66, 16); + this.label5.TabIndex = 11; + this.label5.Text = "Newzbin"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(177, 347); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(33, 13); + this.label6.TabIndex = 10; + this.label6.Text = "Pass:"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(27, 347); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(32, 13); + this.label7.TabIndex = 9; + this.label7.Text = "User:"; + // + // newzbinPassBox + // + this.newzbinPassBox.Location = new System.Drawing.Point(216, 344); + this.newzbinPassBox.Name = "newzbinPassBox"; + this.newzbinPassBox.Size = new System.Drawing.Size(120, 20); + this.newzbinPassBox.TabIndex = 8; + // + // newzbinUserBox + // + this.newzbinUserBox.Location = new System.Drawing.Point(65, 344); + this.newzbinUserBox.Name = "newzbinUserBox"; + this.newzbinUserBox.Size = new System.Drawing.Size(100, 20); + this.newzbinUserBox.TabIndex = 7; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.Location = new System.Drawing.Point(16, 378); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(79, 16); + this.label8.TabIndex = 16; + this.label8.Text = "NZBMatrix"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(177, 412); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(33, 13); + this.label9.TabIndex = 20; + this.label9.Text = "Pass:"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(27, 412); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(32, 13); + this.label10.TabIndex = 19; + this.label10.Text = "User:"; + // + // nzbmatrixPassBox + // + this.nzbmatrixPassBox.Location = new System.Drawing.Point(216, 409); + this.nzbmatrixPassBox.Name = "nzbmatrixPassBox"; + this.nzbmatrixPassBox.Size = new System.Drawing.Size(120, 20); + this.nzbmatrixPassBox.TabIndex = 18; + // + // nzbmatrixUserBox + ... [truncated message content] |