Fixed some resharper line breaks

This commit is contained in:
Keivan 2010-09-27 23:09:24 -07:00
commit de212f8b98
6 changed files with 44 additions and 29 deletions

View file

@ -37,28 +37,29 @@ namespace NzbDrone.Core.Providers
string response = _http.DownloadString(request).Replace("\n", String.Empty);
_logger.DebugFormat("Queue Repsonse: [{0}]", response);
if (response == "ok") return true;
if (response == "ok")
return true;
return false;
}
public bool IsInQueue(string title)
{
string action = "mode=queue&output=xml";
const string action = "mode=queue&output=xml";
string request = GetSabRequest(action);
string response = _http.DownloadString(request);
XDocument xDoc = XDocument.Parse(response);
//If an Error Occurred, retuyrn)
if (xDoc.Descendants("error").Count() != 0) return false;
if (xDoc.Descendants("error").Count() != 0)
return false;
if (xDoc.Descendants("queue").Count() == 0) return false;
if (xDoc.Descendants("queue").Count() == 0)
return false;
//Get the Count of Items in Queue where 'filename' is Equal to goodName, if not zero, return true (isInQueue)))
if ((from s in xDoc.Descendants("slot")
where s.Element("filename").Value.Equals(title, StringComparison.InvariantCultureIgnoreCase)
select s).Count() != 0)
if ((xDoc.Descendants("slot").Where(s => s.Element("filename").Value.Equals(title, StringComparison.InvariantCultureIgnoreCase))).Count() != 0)
{
_logger.DebugFormat("Episode in queue - '{0}'", title);