mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Fixed some resharper line breaks
This commit is contained in:
parent
d00744aafa
commit
de212f8b98
6 changed files with 44 additions and 29 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue