mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
ReSharper code cleanup
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace NzbDrone.PostProcessor
|
||||
{
|
||||
class Program
|
||||
internal class Program
|
||||
{
|
||||
private static string _host = "localhost";
|
||||
private static int _port = 8989;
|
||||
private static string _apiKey = String.Empty;
|
||||
|
||||
static void Main(string[] args)
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -35,7 +32,8 @@ namespace NzbDrone.PostProcessor
|
||||
|
||||
var hostString = _host + ":" + _port;
|
||||
|
||||
var url = String.Format("http://{0}/?apiKey={1}&dir={2}&nzbName={3}&category={4}", hostString, _apiKey, dir, nzbName, category);
|
||||
var url = String.Format("http://{0}/?apiKey={1}&dir={2}&nzbName={3}&category={4}", hostString, _apiKey,
|
||||
dir, nzbName, category);
|
||||
|
||||
var webClient = new WebClient();
|
||||
webClient.DownloadString(url);
|
||||
@@ -46,7 +44,7 @@ namespace NzbDrone.PostProcessor
|
||||
}
|
||||
}
|
||||
|
||||
static bool LoadConfig()
|
||||
private static bool LoadConfig()
|
||||
{
|
||||
var configFile = "PostProcessor.xml";
|
||||
if (!File.Exists(configFile))
|
||||
@@ -65,8 +63,10 @@ namespace NzbDrone.PostProcessor
|
||||
}
|
||||
|
||||
var hostNode = config.Descendants("Host").FirstOrDefault();
|
||||
var portNode = config.Descendants("Port").FirstOrDefault(); ;
|
||||
var apiKeyNode = config.Descendants("ApiKey").FirstOrDefault(); ;
|
||||
var portNode = config.Descendants("Port").FirstOrDefault();
|
||||
;
|
||||
var apiKeyNode = config.Descendants("ApiKey").FirstOrDefault();
|
||||
;
|
||||
|
||||
if (hostNode == null || portNode == null || apiKeyNode == null)
|
||||
{
|
||||
@@ -81,4 +81,4 @@ namespace NzbDrone.PostProcessor
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
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("NzbDrone.PostProcessor")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
@@ -17,9 +17,11 @@ using System.Runtime.InteropServices;
|
||||
// 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("6521fcb0-15dc-4324-b08a-f18f87d78859")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
@@ -32,5 +34,6 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Reference in New Issue
Block a user