mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 01:37:07 +00:00
fixed some build issues
This commit is contained in:
parent
e4fcb6d573
commit
80201c8a88
6 changed files with 4 additions and 187 deletions
|
@ -54,7 +54,7 @@
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Data.SQLite">
|
<Reference Include="System.Data.SQLite">
|
||||||
<HintPath>..\..\NzbDrone.Core\Libraries\System.Data.SQLite.dll</HintPath>
|
<HintPath>..\..\Libraries\System.Data.SQLite.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
|
||||||
<ProductVersion>8.0.30703</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{0C679573-736D-4F77-B934-FD8931AC1AA1}</ProjectGuid>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>NzbDrone.PostProcessor</RootNamespace>
|
|
||||||
<AssemblyName>NzbDrone.PostProcessor</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Program.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="PostProcessor.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<Configuration>
|
|
||||||
<Host>localhost</Host>
|
|
||||||
<Port>8989</Port>
|
|
||||||
<ApiKey>Not-An-API-KEY</ApiKey>
|
|
||||||
</Configuration>
|
|
|
@ -1,84 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
|
||||||
using System.Xml.Linq;
|
|
||||||
|
|
||||||
namespace NzbDrone.PostProcessor
|
|
||||||
{
|
|
||||||
internal class Program
|
|
||||||
{
|
|
||||||
private static string _host = "localhost";
|
|
||||||
private static int _port = 8989;
|
|
||||||
private static string _apiKey = String.Empty;
|
|
||||||
|
|
||||||
private static void Main(string[] args)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (args.Count() < 5)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Did this come from SAB? Missing Arguments..");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Load the ConfigFile
|
|
||||||
if (!LoadConfig())
|
|
||||||
return;
|
|
||||||
|
|
||||||
string dir = args[0]; //Get dir from first CMD Line Argument
|
|
||||||
string nzbName = args[2]; //Get nzbName from third CMD Line Argument
|
|
||||||
string category = args[4]; //Get category from third CMD Line Argument
|
|
||||||
|
|
||||||
var hostString = _host + ":" + _port;
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine(ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool LoadConfig()
|
|
||||||
{
|
|
||||||
var configFile = "PostProcessor.xml";
|
|
||||||
if (!File.Exists(configFile))
|
|
||||||
{
|
|
||||||
Console.WriteLine("Configuration File does not exist, please create");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var xDoc = XDocument.Load(configFile);
|
|
||||||
var config = (from c in xDoc.Descendants("Configuration") select c).FirstOrDefault();
|
|
||||||
|
|
||||||
if (config == null)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Invalid Configuration File");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var hostNode = config.Descendants("Host").FirstOrDefault();
|
|
||||||
var portNode = config.Descendants("Port").FirstOrDefault();
|
|
||||||
;
|
|
||||||
var apiKeyNode = config.Descendants("ApiKey").FirstOrDefault();
|
|
||||||
;
|
|
||||||
|
|
||||||
if (hostNode == null || portNode == null || apiKeyNode == null)
|
|
||||||
{
|
|
||||||
Console.WriteLine("Invalid Configuration File");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_host = hostNode.Value;
|
|
||||||
Int32.TryParse(portNode.Value, out _port);
|
|
||||||
_apiKey = apiKeyNode.Value;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
using System.Reflection;
|
|
||||||
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("")]
|
|
||||||
[assembly: AssemblyCompany("TIO Networks Corp")]
|
|
||||||
[assembly: AssemblyProduct("NzbDrone.PostProcessor")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © TIO Networks Corp 2011")]
|
|
||||||
[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("6521fcb0-15dc-4324-b08a-f18f87d78859")]
|
|
||||||
|
|
||||||
// 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 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")]
|
|
|
@ -894,4 +894,7 @@
|
||||||
</FlavorProperties>
|
</FlavorProperties>
|
||||||
</VisualStudio>
|
</VisualStudio>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>copy $(SolutionDir)\Libraries\SQLite.Interop.dll $(TargetDir)</PreBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in a new issue