Compare commits
200 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5613ab05e0 | |||
| 372442af2c | |||
| 28c45f941b | |||
| ea1616586f | |||
| e48600da42 | |||
| 5d9d2e684e | |||
| 2e392e0f5e | |||
| 83370ddbbb | |||
| c20b152c28 | |||
| bf5067466d | |||
| ec7f749541 | |||
| 56ecbf4a31 | |||
| 1b39911135 | |||
| 6aaefae2d5 | |||
| db9d601115 | |||
| e7331539f0 | |||
| 58bd57bed6 | |||
| 7a58082cd7 | |||
| 2e08f195e4 | |||
| a1a5e29c3e | |||
| 5033886b90 | |||
| 29419d6575 | |||
| 3c22f68f5a | |||
| a0d98951aa | |||
| 70f7404499 | |||
| abd70f5381 | |||
| 878e973081 | |||
| 2bf3b9e7dd | |||
| 2326db0dea | |||
| 3590fedeaf | |||
| f4866cae69 | |||
| 149d191f62 | |||
| bb9bd63382 | |||
| 34fda24124 | |||
| c8d10829a0 | |||
| ae2bdb757a | |||
| 714ad075fc | |||
| 87a05df2fd | |||
| f3263efa52 | |||
| 1cad11d207 | |||
| 781df8b20a | |||
| ebcce05588 | |||
| bbf2134fe1 | |||
| 081c5fc332 | |||
| 47915d5e05 | |||
| 47e221d9a0 | |||
| bf485f6f2c | |||
| b365d8a537 | |||
| fee8da88a6 | |||
| cc0dbf1af4 | |||
| 836131ebb1 | |||
| 9a870a3709 | |||
| afe05189da | |||
| 2abaef16f1 | |||
| 37d5a3f2ad | |||
| be4d70e3a9 | |||
| 79043f2c64 | |||
| 1dab0aee6a | |||
| 9b162f2d5e | |||
| 5518cf5362 | |||
| f7e3d9b4c2 | |||
| 6d9a952bd1 | |||
| 3501e33722 | |||
| fa89d33900 | |||
| 0af48fb2e8 | |||
| 7e9f0d0522 | |||
| 1f8bd8e1e9 | |||
| 2855090005 | |||
| 060b9f6fd1 | |||
| 9304547c95 | |||
| c56c83e169 | |||
| c6fa883662 | |||
| 4043d07ab1 | |||
| 8af3348e7f | |||
| 49d0d4c357 | |||
| 47b1157b96 | |||
| adc79f0eba | |||
| 6b117427f8 | |||
| 7884dd9a39 | |||
| 45d8b1e2ad | |||
| cf306f4aba | |||
| d7aa23388e | |||
| 82a99b7f80 | |||
| 2f6d9e191e | |||
| 0782a15979 | |||
| ddd119a4eb | |||
| d4788b4cae | |||
| 812999423b | |||
| 657730f4d2 | |||
| 0255eb3aca | |||
| fc15daa37e | |||
| 10264a5bfb | |||
| ef044f1ff5 | |||
| ef03e9e9a7 | |||
| 3bd7c09acf | |||
| fbd2f8dea4 | |||
| 15e07f72d4 | |||
| f25bfe9d28 | |||
| d5e720c404 | |||
| c9a8ebc2e6 | |||
| 5e7e816c03 | |||
| f56076a135 | |||
| 54dd527f01 | |||
| c6eb19c04d | |||
| 38b65ba27d | |||
| a2a49ce934 | |||
| 047d5a4388 | |||
| aae69ff49a | |||
| da451cfe03 | |||
| 01e2f4e7e5 | |||
| 8aacc61c50 | |||
| 111e401a2c | |||
| 8d91f18823 | |||
| cea6469ab8 | |||
| ced7a7dce2 | |||
| 20a2cfe260 | |||
| 5b0a285b84 | |||
| 68ea8a551c | |||
| 2e36d35815 | |||
| ed2e4d0f1d | |||
| 0bdc137093 | |||
| cd7e208efa | |||
| 73840dcacc | |||
| e45d4f60a4 | |||
| 782efcfaf1 | |||
| 76a7d4f866 | |||
| d61976251e | |||
| 2487e8ed49 | |||
| 54bc642476 | |||
| 6577b0a721 | |||
| bcd67dee5e | |||
| e6705db743 | |||
| dd7fdd8ace | |||
| a1f112e62f | |||
| 053c730799 | |||
| 61579cfb7e | |||
| 92d706a10d | |||
| 6ae5829439 | |||
| 8252a2a60f | |||
| 009dc14805 | |||
| e0ff25d5be | |||
| ad7d571b24 | |||
| 598b5322b7 | |||
| 76505bdaa1 | |||
| d64d35361c | |||
| d5ef451bb4 | |||
| 3140d5d4b0 | |||
| fdb5ccdae1 | |||
| a2ce435239 | |||
| a34e69b35b | |||
| 03b83ed226 | |||
| eafe79450e | |||
| f286dba40a | |||
| 448f579723 | |||
| 1562081235 | |||
| 0214c8e0f0 | |||
| f16dd069b5 | |||
| aba613acd1 | |||
| 2e36538dcd | |||
| c42e4d682c | |||
| 327536b684 | |||
| 7dbacf105d | |||
| 8d776abb48 | |||
| 7f8093de92 | |||
| c1de7f26d1 | |||
| 4a82d30d3d | |||
| da52e60f36 | |||
| cf58e52f40 | |||
| 2a7ae96906 | |||
| 053f6fcaeb | |||
| 0c75d0bb03 | |||
| 0c9b5dc97e | |||
| c99e92e6af | |||
| 3f64c01d5b | |||
| f022dae1fa | |||
| 52ad8cf37f | |||
| 3d20fd8f96 | |||
| cf662291d5 | |||
| 43d85bf59d | |||
| 4a149c356b | |||
| 740fc9154f | |||
| 0a657302f7 | |||
| 7b09b259a8 | |||
| b093be3f4e | |||
| 3c8b263694 | |||
| 43c5d03f9a | |||
| 9fbe06ad68 | |||
| db899a9bb8 | |||
| d3890bd712 | |||
| 1a61796092 | |||
| 1251e294cd | |||
| 0411b82e65 | |||
| 9519f3137c | |||
| f8d97cac7d | |||
| f2ecbe776b | |||
| 1ac442d0e6 | |||
| 5f2aeb0cea | |||
| 2ece05cd1e | |||
| 25a3f83ebc | |||
| cdce65a922 |
@@ -10,6 +10,7 @@ src/**/[Oo]bj/
|
|||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
*.sln.docstates
|
*.sln.docstates
|
||||||
|
.vs/
|
||||||
|
|
||||||
# Build results
|
# Build results
|
||||||
*_i.c
|
*_i.c
|
||||||
@@ -132,3 +133,5 @@ output/*
|
|||||||
|
|
||||||
_start
|
_start
|
||||||
_temp_*/**/*
|
_temp_*/**/*
|
||||||
|
|
||||||
|
src/.idea/
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ Setup guides, FAQ, the more information we have on the wiki the better.
|
|||||||
## Development ##
|
## Development ##
|
||||||
|
|
||||||
### Tools required ###
|
### Tools required ###
|
||||||
- Visual Studio 2013
|
- Visual Studio 2015
|
||||||
- HTML/Javascript editor of choice (Sublime Text/Webstorm/etc)
|
- HTML/Javascript editor of choice (Sublime Text/Webstorm/Atom/etc)
|
||||||
- npm (node package manager)
|
- npm (node package manager)
|
||||||
- git
|
- git
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 490 B |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,52 @@
|
|||||||
|
# Sonarr
|
||||||
|
|
||||||
|
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
|
||||||
|
|
||||||
|
## Major Features Include:
|
||||||
|
|
||||||
|
* Support for major platforms: Windows, Linux, macOS, Raspberry Pi, etc.
|
||||||
|
* Automatically detects new episodes
|
||||||
|
* Can scan your existing library and download any missing episodes
|
||||||
|
* Can watch for better quality of the episodes you already have and do an automatic upgrade. *eg. from DVD to Blu-Ray*
|
||||||
|
* Automatic failed download handling will try another release if one fails
|
||||||
|
* Manual search so you can pick any release or to see why a release was not downloaded automatically
|
||||||
|
* Fully configurable episode renaming
|
||||||
|
* Full integration with SABnzbd and NZBGet
|
||||||
|
* Full integration with Kodi, Plex (notification, library update, metadata)
|
||||||
|
* Full support for specials and multi-episode releases
|
||||||
|
* And a beautiful UI
|
||||||
|
|
||||||
|
## Configuring Development Environment:
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
* Visual Studio 2015 (https://www.visualstudio.com/vs/)
|
||||||
|
* [Git](https://git-scm.com/downloads)
|
||||||
|
* [NodeJS](https://nodejs.org/en/download/)
|
||||||
|
|
||||||
|
### Setup
|
||||||
|
|
||||||
|
* Make sure all the required software mentioned above are installed.
|
||||||
|
* Clone the repository into your development machine. [*info*](https://help.github.com/articles/working-with-repositories)
|
||||||
|
* Grab the submodules `git submodule init && git submodule update`
|
||||||
|
* Install the required Node Packages `npm install`
|
||||||
|
* Start gulp to monitor your dev environment for any changes that need post processing using `npm start` command.
|
||||||
|
|
||||||
|
*Please note gulp must be running at all times while you are working with Sonarr client source files.*
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
|
* Open `NzbDrone.sln` in Visual Studio
|
||||||
|
* Make sure `NzbDrone.Console` is set as the startup project
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
|
||||||
|
* Copyright 2010-2017
|
||||||
|
|
||||||
|
### Sponsors
|
||||||
|
|
||||||
|
* [JetBrains](http://www.jetbrains.com/) for providing us with free licenses to their great tools
|
||||||
|
* [ReSharper](http://www.jetbrains.com/resharper/)
|
||||||
|
* [WebStorm](http://www.jetbrains.com/webstorm/)
|
||||||
|
* [TeamCity](http://www.jetbrains.com/teamcity/)
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# Sonarr #
|
|
||||||
|
|
||||||
|
|
||||||
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
|
|
||||||
|
|
||||||
## Major Features Include: ##
|
|
||||||
|
|
||||||
* Support for major platforms: Windows, Linux, OSX, Raspberry Pi, etc.
|
|
||||||
* Automatically detects new episodes
|
|
||||||
* Can scan your existing library and download any missing episodes
|
|
||||||
* Can watch for better quality of the episodes you already have and do an automatic upgrade. *eg. from DVD to Blu-Ray*
|
|
||||||
* Automatic failed download handling will try another release if one fails
|
|
||||||
* Manual search so you can pick any release or to see why a release was not downloaded automatically
|
|
||||||
* Fully configurable episode renaming
|
|
||||||
* Full integration with SABNzbd and NzbGet
|
|
||||||
* Full integration with XBMC, Plex (notification, library update, metadata)
|
|
||||||
* Full support for specials and multi-episode releases
|
|
||||||
* And a beautiful UI
|
|
||||||
|
|
||||||
|
|
||||||
## Configuring Development Environment: ##
|
|
||||||
|
|
||||||
### Requirements ###
|
|
||||||
- Visual Studio 2015 [Free Community Edition](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
|
|
||||||
- [Git](http://git-scm.com/downloads)
|
|
||||||
- [NodeJS](http://nodejs.org/download/)
|
|
||||||
|
|
||||||
### Setup ###
|
|
||||||
|
|
||||||
- Make sure all the required software mentioned above are installed.
|
|
||||||
- Clone the repository into your development machine. [*info*](https://help.github.com/articles/working-with-repositories)
|
|
||||||
- Grab the submodules `git submodule init && git submodule update`
|
|
||||||
- install the required Node Packages `npm install`
|
|
||||||
- start gulp to monitor your dev environment for any changes that need post processing using `npm start` command.
|
|
||||||
|
|
||||||
*Please note gulp must be running at all times while you are working with Sonarr client source files.*
|
|
||||||
|
|
||||||
|
|
||||||
### Development ###
|
|
||||||
- Open `NzbDrone.sln` in Visual Studio
|
|
||||||
- Make sure `NzbDrone.Console` is set as the startup project
|
|
||||||
|
|
||||||
|
|
||||||
### License ###
|
|
||||||
* [GNU GPL v3](http://www.gnu.org/licenses/gpl.html)
|
|
||||||
Copyright 2010-2016
|
|
||||||
|
|
||||||
|
|
||||||
### Sponsors ###
|
|
||||||
- [JetBrains](http://www.jetbrains.com/) for providing us with free licenses to their great tools
|
|
||||||
- [ReSharper](http://www.jetbrains.com/resharper/)
|
|
||||||
- [WebStorm](http://www.jetbrains.com/webstorm/)
|
|
||||||
- [TeamCity](http://www.jetbrains.com/teamcity/)
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -52,8 +52,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.4.3\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="NLog" version="4.3.4" targetFramework="net40" />
|
<package id="NLog" version="4.4.3" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
|
||||||
using System.Linq.Expressions;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.SignalR.Infrastructure
|
namespace Microsoft.AspNet.SignalR.Infrastructure
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ using System.Diagnostics;
|
|||||||
|
|
||||||
namespace Microsoft.AspNet.SignalR.Infrastructure
|
namespace Microsoft.AspNet.SignalR.Infrastructure
|
||||||
{
|
{
|
||||||
internal class NoOpPerformanceCounter : IPerformanceCounter
|
public class NoOpPerformanceCounter : IPerformanceCounter
|
||||||
{
|
{
|
||||||
public string CounterName
|
public string CounterName
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,9 +43,9 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -281,4 +281,4 @@
|
|||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
@@ -6,7 +6,6 @@ using System.Diagnostics;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.SignalR.Configuration;
|
using Microsoft.AspNet.SignalR.Configuration;
|
||||||
using Microsoft.AspNet.SignalR.Hosting;
|
using Microsoft.AspNet.SignalR.Hosting;
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Globalization;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.SignalR.Infrastructure;
|
using Microsoft.AspNet.SignalR.Infrastructure;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.SignalR.Hosting;
|
using Microsoft.AspNet.SignalR.Hosting;
|
||||||
using Microsoft.AspNet.SignalR.Infrastructure;
|
using Microsoft.AspNet.SignalR.Infrastructure;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net40" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -5,13 +5,10 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNet.SignalR.Owin.Infrastructure;
|
using Microsoft.AspNet.SignalR.Owin.Infrastructure;
|
||||||
using Microsoft.AspNet.SignalR.Hosting;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNet.SignalR.Owin
|
namespace Microsoft.AspNet.SignalR.Owin
|
||||||
{
|
{
|
||||||
using WebSocketFunc = Func<IDictionary<string, object>, Task>;
|
|
||||||
public partial class ServerRequest :
|
public partial class ServerRequest :
|
||||||
#if NET45
|
#if NET45
|
||||||
IWebSocketRequest
|
IWebSocketRequest
|
||||||
|
|||||||
@@ -38,17 +38,21 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
<Reference Include="FizzWare.NBuilder, Version=4.0.0.115, Culture=neutral, PublicKeyToken=5651b03e12e42c12, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.dll</HintPath>
|
<HintPath>..\packages\NBuilder.4.0.0\lib\net40\FizzWare.NBuilder.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
<Reference Include="FluentAssertions, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net40\FluentAssertions.Core.dll</HintPath>
|
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.dll</HintPath>
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
<Reference Include="FluentAssertions.Core, Version=4.19.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NUnit.3.2.0\lib\net40\nunit.framework.dll</HintPath>
|
<HintPath>..\packages\FluentAssertions.4.19.0\lib\net40\FluentAssertions.Core.dll</HintPath>
|
||||||
<Private>True</Private>
|
</Reference>
|
||||||
|
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="nunit.framework, Version=3.6.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NUnit.3.6.0\lib\net40\nunit.framework.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -57,9 +61,6 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="FizzWare.NBuilder">
|
|
||||||
<HintPath>..\packages\NBuilder.3.0.1.1\lib\FizzWare.NBuilder.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Moq">
|
<Reference Include="Moq">
|
||||||
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
|
<HintPath>..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net40" />
|
<package id="FluentAssertions" version="4.19.0" targetFramework="net40" />
|
||||||
<package id="Moq" version="4.0.10827" />
|
<package id="Moq" version="4.0.10827" />
|
||||||
<package id="NBuilder" version="3.0.1.1" targetFramework="net40" />
|
<package id="NBuilder" version="4.0.0" targetFramework="net40" />
|
||||||
<package id="NUnit" version="3.2.0" targetFramework="net40" />
|
<package id="NUnit" version="3.6.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -27,7 +27,7 @@ namespace NzbDrone.Api.Authentication
|
|||||||
_configFileProvider = configFileProvider;
|
_configFileProvider = configFileProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order { get { return 10; } }
|
public int Order => 10;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Core.Blacklisting;
|
||||||
using NzbDrone.Core.Blacklisting;
|
|
||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Datastore;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Blacklist
|
namespace NzbDrone.Api.Blacklist
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using DDay.iCal;
|
using Ical.Net;
|
||||||
|
using Ical.Net.DataTypes;
|
||||||
|
using Ical.Net.Interfaces.Serialization;
|
||||||
|
using Ical.Net.Serialization;
|
||||||
|
using Ical.Net.Serialization.iCalendar.Factory;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Tv;
|
||||||
using Nancy.Responses;
|
using Nancy.Responses;
|
||||||
using NzbDrone.Core.Tags;
|
using NzbDrone.Core.Tags;
|
||||||
@@ -22,6 +26,7 @@ namespace NzbDrone.Api.Calendar
|
|||||||
_tagService = tagService;
|
_tagService = tagService;
|
||||||
|
|
||||||
Get["/NzbDrone.ics"] = options => GetCalendarFeed();
|
Get["/NzbDrone.ics"] = options => GetCalendarFeed();
|
||||||
|
Get["/Sonarr.ics"] = options => GetCalendarFeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Response GetCalendarFeed()
|
private Response GetCalendarFeed()
|
||||||
@@ -32,6 +37,7 @@ namespace NzbDrone.Api.Calendar
|
|||||||
var end = DateTime.Today.AddDays(futureDays);
|
var end = DateTime.Today.AddDays(futureDays);
|
||||||
var unmonitored = false;
|
var unmonitored = false;
|
||||||
var premiersOnly = false;
|
var premiersOnly = false;
|
||||||
|
var asAllDay = false;
|
||||||
var tags = new List<int>();
|
var tags = new List<int>();
|
||||||
|
|
||||||
// TODO: Remove start/end parameters in v3, they don't work well for iCal
|
// TODO: Remove start/end parameters in v3, they don't work well for iCal
|
||||||
@@ -41,6 +47,7 @@ namespace NzbDrone.Api.Calendar
|
|||||||
var queryFutureDays = Request.Query.FutureDays;
|
var queryFutureDays = Request.Query.FutureDays;
|
||||||
var queryUnmonitored = Request.Query.Unmonitored;
|
var queryUnmonitored = Request.Query.Unmonitored;
|
||||||
var queryPremiersOnly = Request.Query.PremiersOnly;
|
var queryPremiersOnly = Request.Query.PremiersOnly;
|
||||||
|
var queryAsAllDay = Request.Query.AsAllDay;
|
||||||
var queryTags = Request.Query.Tags;
|
var queryTags = Request.Query.Tags;
|
||||||
|
|
||||||
if (queryStart.HasValue) start = DateTime.Parse(queryStart.Value);
|
if (queryStart.HasValue) start = DateTime.Parse(queryStart.Value);
|
||||||
@@ -68,6 +75,11 @@ namespace NzbDrone.Api.Calendar
|
|||||||
premiersOnly = bool.Parse(queryPremiersOnly.Value);
|
premiersOnly = bool.Parse(queryPremiersOnly.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (queryAsAllDay.HasValue)
|
||||||
|
{
|
||||||
|
asAllDay = bool.Parse(queryAsAllDay.Value);
|
||||||
|
}
|
||||||
|
|
||||||
if (queryTags.HasValue)
|
if (queryTags.HasValue)
|
||||||
{
|
{
|
||||||
var tagInput = (string)queryTags.Value.ToString();
|
var tagInput = (string)queryTags.Value.ToString();
|
||||||
@@ -75,7 +87,12 @@ namespace NzbDrone.Api.Calendar
|
|||||||
}
|
}
|
||||||
|
|
||||||
var episodes = _episodeService.EpisodesBetweenDates(start, end, unmonitored);
|
var episodes = _episodeService.EpisodesBetweenDates(start, end, unmonitored);
|
||||||
var icalCalendar = new iCalendar();
|
var calendar = new Ical.Net.Calendar
|
||||||
|
{
|
||||||
|
ProductId = "-//sonarr.tv//Sonarr//EN"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var episode in episodes.OrderBy(v => v.AirDateUtc.Value))
|
foreach (var episode in episodes.OrderBy(v => v.AirDateUtc.Value))
|
||||||
{
|
{
|
||||||
@@ -89,28 +106,35 @@ namespace NzbDrone.Api.Calendar
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var occurrence = icalCalendar.Create<Event>();
|
var occurrence = calendar.Create<Event>();
|
||||||
occurrence.UID = "NzbDrone_episode_" + episode.Id.ToString();
|
occurrence.Uid = "NzbDrone_episode_" + episode.Id;
|
||||||
occurrence.Status = episode.HasFile ? EventStatus.Confirmed : EventStatus.Tentative;
|
occurrence.Status = episode.HasFile ? EventStatus.Confirmed : EventStatus.Tentative;
|
||||||
occurrence.Start = new iCalDateTime(episode.AirDateUtc.Value) { HasTime = true };
|
|
||||||
occurrence.End = new iCalDateTime(episode.AirDateUtc.Value.AddMinutes(episode.Series.Runtime)) { HasTime = true };
|
|
||||||
occurrence.Description = episode.Overview;
|
occurrence.Description = episode.Overview;
|
||||||
occurrence.Categories = new List<string>() { episode.Series.Network };
|
occurrence.Categories = new List<string>() { episode.Series.Network };
|
||||||
|
|
||||||
|
if (asAllDay)
|
||||||
|
{
|
||||||
|
occurrence.Start = new CalDateTime(episode.AirDateUtc.Value) { HasTime = false };
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
occurrence.Start = new CalDateTime(episode.AirDateUtc.Value) { HasTime = true };
|
||||||
|
occurrence.End = new CalDateTime(episode.AirDateUtc.Value.AddMinutes(episode.Series.Runtime)) { HasTime = true };
|
||||||
|
}
|
||||||
|
|
||||||
switch (episode.Series.SeriesType)
|
switch (episode.Series.SeriesType)
|
||||||
{
|
{
|
||||||
case SeriesTypes.Daily:
|
case SeriesTypes.Daily:
|
||||||
occurrence.Summary = string.Format("{0} - {1}", episode.Series.Title, episode.Title);
|
occurrence.Summary = $"{episode.Series.Title} - {episode.Title}";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
occurrence.Summary = string.Format("{0} - {1}x{2:00} - {3}", episode.Series.Title, episode.SeasonNumber, episode.EpisodeNumber, episode.Title);
|
occurrence.Summary =$"{episode.Series.Title} - {episode.SeasonNumber}x{episode.EpisodeNumber:00} - {episode.Title}";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var serializer = new DDay.iCal.Serialization.iCalendar.SerializerFactory().Build(icalCalendar.GetType(), new DDay.iCal.Serialization.SerializationContext()) as DDay.iCal.Serialization.IStringSerializer;
|
var serializer = (IStringSerializer) new SerializerFactory().Build(calendar.GetType(), new SerializationContext());
|
||||||
var icalendar = serializer.SerializeToString(icalCalendar);
|
var icalendar = serializer.SerializeToString(calendar);
|
||||||
|
|
||||||
return new TextResponse(icalendar, "text/calendar");
|
return new TextResponse(icalendar, "text/calendar");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.ClientSchema
|
namespace NzbDrone.Api.ClientSchema
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,14 +73,14 @@ namespace NzbDrone.Api.ClientSchema
|
|||||||
|
|
||||||
if (propertyInfo.PropertyType == typeof(int))
|
if (propertyInfo.PropertyType == typeof(int))
|
||||||
{
|
{
|
||||||
var value = Convert.ToInt32(field.Value);
|
var value = field.Value.ToString().ParseInt32();
|
||||||
propertyInfo.SetValue(target, value, null);
|
propertyInfo.SetValue(target, value ?? 0, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (propertyInfo.PropertyType == typeof(long))
|
else if (propertyInfo.PropertyType == typeof(long))
|
||||||
{
|
{
|
||||||
var value = Convert.ToInt64(field.Value);
|
var value = field.Value.ToString().ParseInt64();
|
||||||
propertyInfo.SetValue(target, value, null);
|
propertyInfo.SetValue(target, value ?? 0, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (propertyInfo.PropertyType == typeof(int?))
|
else if (propertyInfo.PropertyType == typeof(int?))
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using FluentValidation;
|
||||||
using FluentValidation;
|
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Validation.Paths;
|
using NzbDrone.Core.Validation.Paths;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.REST;
|
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Config
|
namespace NzbDrone.Api.Config
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.REST;
|
|
||||||
using NzbDrone.Core.Authentication;
|
using NzbDrone.Core.Authentication;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Update;
|
using NzbDrone.Core.Update;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using FluentValidation;
|
||||||
using FluentValidation;
|
|
||||||
using NzbDrone.Api.Validation;
|
using NzbDrone.Api.Validation;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.REST;
|
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Config
|
namespace NzbDrone.Api.Config
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace NzbDrone.Api.Config
|
|||||||
|
|
||||||
public bool SkipFreeSpaceCheckWhenImporting { get; set; }
|
public bool SkipFreeSpaceCheckWhenImporting { get; set; }
|
||||||
public bool CopyUsingHardlinks { get; set; }
|
public bool CopyUsingHardlinks { get; set; }
|
||||||
|
public bool ImportExtraFiles { get; set; }
|
||||||
public string ExtraFileExtensions { get; set; }
|
public string ExtraFileExtensions { get; set; }
|
||||||
public bool EnableMediaInfo { get; set; }
|
public bool EnableMediaInfo { get; set; }
|
||||||
}
|
}
|
||||||
@@ -44,7 +45,9 @@ namespace NzbDrone.Api.Config
|
|||||||
|
|
||||||
SkipFreeSpaceCheckWhenImporting = model.SkipFreeSpaceCheckWhenImporting,
|
SkipFreeSpaceCheckWhenImporting = model.SkipFreeSpaceCheckWhenImporting,
|
||||||
CopyUsingHardlinks = model.CopyUsingHardlinks,
|
CopyUsingHardlinks = model.CopyUsingHardlinks,
|
||||||
EnableMediaInfo = model.EnableMediaInfo,
|
ImportExtraFiles = model.ImportExtraFiles,
|
||||||
|
ExtraFileExtensions = model.ExtraFileExtensions,
|
||||||
|
EnableMediaInfo = model.EnableMediaInfo
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using FluentValidation.Results;
|
using FluentValidation.Results;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.REST;
|
|
||||||
using NzbDrone.Core.Organizer;
|
using NzbDrone.Core.Organizer;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Config
|
namespace NzbDrone.Api.Config
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Core.Configuration;
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using NzbDrone.Core.Configuration;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.Config
|
namespace NzbDrone.Api.Config
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.REST;
|
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Config
|
namespace NzbDrone.Api.Config
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using NzbDrone.Core.DiskSpace;
|
using NzbDrone.Core.DiskSpace;
|
||||||
|
|
||||||
namespace NzbDrone.Api.DiskSpace
|
namespace NzbDrone.Api.DiskSpace
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.REST;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.DiskSpace
|
namespace NzbDrone.Api.DiskSpace
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Core.Download;
|
||||||
using NzbDrone.Core.Download;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.DownloadClient
|
namespace NzbDrone.Api.DownloadClient
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Core.Indexers;
|
||||||
using NzbDrone.Core.Indexers;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.DownloadClient
|
namespace NzbDrone.Api.DownloadClient
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
|
using NzbDrone.Common.Disk;
|
||||||
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Datastore.Events;
|
using NzbDrone.Core.Datastore.Events;
|
||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.MediaFiles.Events;
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
@@ -17,6 +18,7 @@ namespace NzbDrone.Api.EpisodeFiles
|
|||||||
IHandle<EpisodeFileAddedEvent>
|
IHandle<EpisodeFileAddedEvent>
|
||||||
{
|
{
|
||||||
private readonly IMediaFileService _mediaFileService;
|
private readonly IMediaFileService _mediaFileService;
|
||||||
|
private readonly IDiskProvider _diskProvider;
|
||||||
private readonly IRecycleBinProvider _recycleBinProvider;
|
private readonly IRecycleBinProvider _recycleBinProvider;
|
||||||
private readonly ISeriesService _seriesService;
|
private readonly ISeriesService _seriesService;
|
||||||
private readonly IQualityUpgradableSpecification _qualityUpgradableSpecification;
|
private readonly IQualityUpgradableSpecification _qualityUpgradableSpecification;
|
||||||
@@ -24,6 +26,7 @@ namespace NzbDrone.Api.EpisodeFiles
|
|||||||
|
|
||||||
public EpisodeFileModule(IBroadcastSignalRMessage signalRBroadcaster,
|
public EpisodeFileModule(IBroadcastSignalRMessage signalRBroadcaster,
|
||||||
IMediaFileService mediaFileService,
|
IMediaFileService mediaFileService,
|
||||||
|
IDiskProvider diskProvider,
|
||||||
IRecycleBinProvider recycleBinProvider,
|
IRecycleBinProvider recycleBinProvider,
|
||||||
ISeriesService seriesService,
|
ISeriesService seriesService,
|
||||||
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
||||||
@@ -31,6 +34,7 @@ namespace NzbDrone.Api.EpisodeFiles
|
|||||||
: base(signalRBroadcaster)
|
: base(signalRBroadcaster)
|
||||||
{
|
{
|
||||||
_mediaFileService = mediaFileService;
|
_mediaFileService = mediaFileService;
|
||||||
|
_diskProvider = diskProvider;
|
||||||
_recycleBinProvider = recycleBinProvider;
|
_recycleBinProvider = recycleBinProvider;
|
||||||
_seriesService = seriesService;
|
_seriesService = seriesService;
|
||||||
_qualityUpgradableSpecification = qualityUpgradableSpecification;
|
_qualityUpgradableSpecification = qualityUpgradableSpecification;
|
||||||
@@ -75,9 +79,10 @@ namespace NzbDrone.Api.EpisodeFiles
|
|||||||
var episodeFile = _mediaFileService.Get(id);
|
var episodeFile = _mediaFileService.Get(id);
|
||||||
var series = _seriesService.GetSeries(episodeFile.SeriesId);
|
var series = _seriesService.GetSeries(episodeFile.SeriesId);
|
||||||
var fullPath = Path.Combine(series.Path, episodeFile.RelativePath);
|
var fullPath = Path.Combine(series.Path, episodeFile.RelativePath);
|
||||||
|
var subfolder = _diskProvider.GetParentFolder(series.Path).GetRelativePath(_diskProvider.GetParentFolder(fullPath));
|
||||||
|
|
||||||
_logger.Info("Deleting episode file: {0}", fullPath);
|
_logger.Info("Deleting episode file: {0}", fullPath);
|
||||||
_recycleBinProvider.DeleteFile(fullPath);
|
_recycleBinProvider.DeleteFile(fullPath, subfolder);
|
||||||
_mediaFileService.Delete(episodeFile, DeleteMediaFileReason.Manual);
|
_mediaFileService.Delete(episodeFile, DeleteMediaFileReason.Manual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Api.EpisodeFiles;
|
using NzbDrone.Api.EpisodeFiles;
|
||||||
using NzbDrone.Api.Extensions;
|
|
||||||
using NzbDrone.Api.Series;
|
using NzbDrone.Api.Series;
|
||||||
using NzbDrone.Core.Datastore.Events;
|
using NzbDrone.Core.Datastore.Events;
|
||||||
using NzbDrone.Core.DecisionEngine;
|
using NzbDrone.Core.DecisionEngine;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
|
|
||||||
|
|||||||
@@ -63,18 +63,16 @@ namespace NzbDrone.Api.ErrorManagement
|
|||||||
}.AsResponse(HttpStatusCode.Conflict);
|
}.AsResponse(HttpStatusCode.Conflict);
|
||||||
}
|
}
|
||||||
|
|
||||||
var sqlErrorMessage = string.Format("[{0} {1}]", context.Request.Method, context.Request.Path);
|
_logger.Error(sqLiteException, "[{0} {1}]", context.Request.Method, context.Request.Path);
|
||||||
|
|
||||||
_logger.Error(sqLiteException, sqlErrorMessage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Fatal(exception, "Request Failed");
|
_logger.Fatal(exception, "Request Failed. {0} {1}", context.Request.Method, context.Request.Path);
|
||||||
|
|
||||||
return new ErrorModel
|
return new ErrorModel
|
||||||
{
|
{
|
||||||
Message = exception.Message,
|
Message = exception.Message,
|
||||||
Description = exception.ToString()
|
Description = exception.ToString()
|
||||||
}.AsResponse(HttpStatusCode.InternalServerError);
|
}.AsResponse(HttpStatusCode.InternalServerError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
_cacheableSpecification = cacheableSpecification;
|
_cacheableSpecification = cacheableSpecification;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
{
|
{
|
||||||
public class CorsPipeline : IRegisterNancyPipeline
|
public class CorsPipeline : IRegisterNancyPipeline
|
||||||
{
|
{
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
{
|
{
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public GzipCompressionPipeline(Logger logger)
|
public GzipCompressionPipeline(Logger logger)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
_cacheableSpecification = cacheableSpecification;
|
_cacheableSpecification = cacheableSpecification;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
{
|
{
|
||||||
public class NzbDroneVersionPipeline : IRegisterNancyPipeline
|
public class NzbDroneVersionPipeline : IRegisterNancyPipeline
|
||||||
{
|
{
|
||||||
public int Order { get { return 0; } }
|
public int Order => 0;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Nancy;
|
using Nancy;
|
||||||
using Nancy.Bootstrapper;
|
using Nancy.Bootstrapper;
|
||||||
@@ -23,7 +22,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
_errorPipeline = errorPipeline;
|
_errorPipeline = errorPipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Order { get { return 100; } }
|
public int Order => 100;
|
||||||
|
|
||||||
public void Register(IPipelines pipelines)
|
public void Register(IPipelines pipelines)
|
||||||
{
|
{
|
||||||
@@ -40,7 +39,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
context.Items["ApiRequestStartTime"] = DateTime.UtcNow;
|
context.Items["ApiRequestStartTime"] = DateTime.UtcNow;
|
||||||
|
|
||||||
var reqPath = GetRequestPathAndQuery(context.Request);
|
var reqPath = GetRequestPathAndQuery(context.Request);
|
||||||
|
|
||||||
_loggerHttp.Trace("Req: {0} [{1}] {2}", id, context.Request.Method, reqPath);
|
_loggerHttp.Trace("Req: {0} [{1}] {2}", id, context.Request.Method, reqPath);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@@ -81,7 +80,7 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
{
|
{
|
||||||
if (request.Url.Query.IsNotNullOrWhiteSpace())
|
if (request.Url.Query.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
return string.Concat(request.Url.Path, "?", request.Url.Query);
|
return string.Concat(request.Url.Path, request.Url.Query);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -89,4 +88,4 @@ namespace NzbDrone.Api.Extensions.Pipelines
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace NzbDrone.Api.Frontend
|
|||||||
{
|
{
|
||||||
public bool IsCacheable(NancyContext context)
|
public bool IsCacheable(NancyContext context)
|
||||||
{
|
{
|
||||||
if (!RuntimeInfoBase.IsProduction)
|
if (!RuntimeInfo.IsProduction)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using System;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Disk;
|
using NzbDrone.Common.Disk;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace NzbDrone.Api.Frontend.Mappers
|
|||||||
|
|
||||||
private string GetIndexText()
|
private string GetIndexText()
|
||||||
{
|
{
|
||||||
if (RuntimeInfoBase.IsProduction && _generatedContent != null)
|
if (RuntimeInfo.IsProduction && _generatedContent != null)
|
||||||
{
|
{
|
||||||
return _generatedContent;
|
return _generatedContent;
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ namespace NzbDrone.Api.Frontend.Mappers
|
|||||||
text = text.Replace("APP_BRANCH", _configFileProvider.Branch.ToLower());
|
text = text.Replace("APP_BRANCH", _configFileProvider.Branch.ToLower());
|
||||||
text = text.Replace("APP_ANALYTICS", _analyticsService.IsEnabled.ToString().ToLowerInvariant());
|
text = text.Replace("APP_ANALYTICS", _analyticsService.IsEnabled.ToString().ToLowerInvariant());
|
||||||
text = text.Replace("URL_BASE", URL_BASE);
|
text = text.Replace("URL_BASE", URL_BASE);
|
||||||
text = text.Replace("PRODUCTION", RuntimeInfoBase.IsProduction.ToString().ToLowerInvariant());
|
text = text.Replace("PRODUCTION", RuntimeInfo.IsProduction.ToString().ToLowerInvariant());
|
||||||
|
|
||||||
_generatedContent = text;
|
_generatedContent = text;
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace NzbDrone.Api.Frontend.Mappers
|
|||||||
|
|
||||||
private string GetLoginText()
|
private string GetLoginText()
|
||||||
{
|
{
|
||||||
if (RuntimeInfoBase.IsProduction && _generatedContent != null)
|
if (RuntimeInfo.IsProduction && _generatedContent != null)
|
||||||
{
|
{
|
||||||
return _generatedContent;
|
return _generatedContent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Nancy;
|
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Disk;
|
using NzbDrone.Common.Disk;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.IO;
|
||||||
using System.IO;
|
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Disk;
|
using NzbDrone.Common.Disk;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using NLog;
|
using NLog;
|
||||||
using Nancy;
|
using Nancy;
|
||||||
@@ -21,7 +21,7 @@ namespace NzbDrone.Api.Frontend.Mappers
|
|||||||
_diskProvider = diskProvider;
|
_diskProvider = diskProvider;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
|
|
||||||
if (!RuntimeInfoBase.IsProduction)
|
if (!RuntimeInfo.IsProduction)
|
||||||
{
|
{
|
||||||
_caseSensitive = StringComparison.OrdinalIgnoreCase;
|
_caseSensitive = StringComparison.OrdinalIgnoreCase;
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@ namespace NzbDrone.Api.Frontend.Mappers
|
|||||||
if (_diskProvider.FileExists(filePath, _caseSensitive))
|
if (_diskProvider.FileExists(filePath, _caseSensitive))
|
||||||
{
|
{
|
||||||
var response = new StreamResponse(() => GetContentStream(filePath), MimeTypes.GetMimeType(filePath));
|
var response = new StreamResponse(() => GetContentStream(filePath), MimeTypes.GetMimeType(filePath));
|
||||||
return response;
|
return new MaterialisingResponse(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Warn("File {0} not found", filePath);
|
_logger.Warn("File {0} not found", filePath);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Core.Indexers;
|
||||||
using NzbDrone.Core.Indexers;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.Indexers
|
namespace NzbDrone.Api.Indexers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Core.Indexers;
|
||||||
using NzbDrone.Core.Indexers;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.Indexers
|
namespace NzbDrone.Api.Indexers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace NzbDrone.Api.Indexers
|
|||||||
}
|
}
|
||||||
catch (ReleaseDownloadException ex)
|
catch (ReleaseDownloadException ex)
|
||||||
{
|
{
|
||||||
_logger.Error(ex, ex.Message);
|
_logger.Error(ex);
|
||||||
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Getting release from indexer failed");
|
throw new NzbDroneClientException(HttpStatusCode.Conflict, "Getting release from indexer failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ namespace NzbDrone.Api.Indexers
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.Error(ex, "Episode search failed: " + ex.Message);
|
_logger.Error(ex, "Episode search failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new List<ReleaseResource>();
|
return new List<ReleaseResource>();
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NzbDrone.Core.DecisionEngine;
|
using NzbDrone.Core.DecisionEngine;
|
||||||
using NzbDrone.Core.Indexers;
|
|
||||||
using NzbDrone.Core.Parser.Model;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.Indexers
|
namespace NzbDrone.Api.Indexers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ using System.Linq;
|
|||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Api.Extensions;
|
using NzbDrone.Api.Extensions;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Core.Indexers;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.Indexers
|
namespace NzbDrone.Api.Indexers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,13 +31,6 @@ namespace NzbDrone.Api.Logs
|
|||||||
return Path.Combine(_appFolderInfo.GetLogFolder(), filename);
|
return Path.Combine(_appFolderInfo.GetLogFolder(), filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string DownloadUrlRoot
|
protected override string DownloadUrlRoot => "logfile";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "logfile";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Common.Disk;
|
using NzbDrone.Common.Disk;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Instrumentation;
|
||||||
using NzbDrone.Core.Instrumentation;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.Logs
|
namespace NzbDrone.Api.Logs
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
@@ -38,12 +37,6 @@ namespace NzbDrone.Api.Logs
|
|||||||
return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename);
|
return Path.Combine(_appFolderInfo.GetUpdateLogFolder(), filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string DownloadUrlRoot
|
protected override string DownloadUrlRoot => "updatelogfile";
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "updatelogfile";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Core.Extras.Metadata;
|
||||||
using NzbDrone.Core.Extras.Metadata;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.Metadata
|
namespace NzbDrone.Api.Metadata
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System;
|
namespace NzbDrone.Api.Metadata
|
||||||
|
|
||||||
namespace NzbDrone.Api.Metadata
|
|
||||||
{
|
{
|
||||||
public class MetadataResource : ProviderResource
|
public class MetadataResource : ProviderResource
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
using System;
|
using System.Linq;
|
||||||
using System.Linq;
|
|
||||||
using Nancy;
|
|
||||||
using Nancy.Bootstrapper;
|
using Nancy.Bootstrapper;
|
||||||
using Nancy.Diagnostics;
|
using Nancy.Diagnostics;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Api.ErrorManagement;
|
|
||||||
using NzbDrone.Api.Extensions.Pipelines;
|
using NzbDrone.Api.Extensions.Pipelines;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Instrumentation;
|
using NzbDrone.Common.Instrumentation;
|
||||||
@@ -27,9 +24,9 @@ namespace NzbDrone.Api
|
|||||||
|
|
||||||
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
|
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
|
||||||
{
|
{
|
||||||
Logger.Info("Starting NzbDrone API");
|
Logger.Info("Starting Web Server");
|
||||||
|
|
||||||
if (RuntimeInfoBase.IsProduction)
|
if (RuntimeInfo.IsProduction)
|
||||||
{
|
{
|
||||||
DiagnosticsHook.Disable(pipelines);
|
DiagnosticsHook.Disable(pipelines);
|
||||||
}
|
}
|
||||||
@@ -55,17 +52,8 @@ namespace NzbDrone.Api
|
|||||||
return _tinyIoCContainer;
|
return _tinyIoCContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override DiagnosticsConfiguration DiagnosticsConfiguration
|
protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" };
|
||||||
{
|
|
||||||
get { return new DiagnosticsConfiguration { Password = @"password" }; }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override byte[] FavIcon
|
protected override byte[] FavIcon => null;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using NzbDrone.Core.Notifications;
|
||||||
using NzbDrone.Core.Notifications;
|
|
||||||
|
|
||||||
namespace NzbDrone.Api.Notifications
|
namespace NzbDrone.Api.Notifications
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,36 +40,45 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Ical.Net.2.2.32\lib\net40\antlr.runtime.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="FluentValidation, Version=6.2.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="FluentValidation, Version=6.2.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll</HintPath>
|
<HintPath>..\packages\FluentValidation.6.2.1.0\lib\portable-net40+sl50+wp80+win8+wpa81\FluentValidation.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Nancy, Version=0.23.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Ical.Net, Version=2.1.0.18776, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Ical.Net.2.2.32\lib\net40\Ical.Net.dll</HintPath>
|
||||||
<HintPath>..\packages\Nancy.0.23.2\lib\net40\Nancy.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Nancy.Authentication.Basic, Version=0.23.2.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Ical.Net.Collections, Version=2.1.0.18775, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Ical.Net.2.2.32\lib\net40\Ical.Net.Collections.dll</HintPath>
|
||||||
<HintPath>..\packages\Nancy.Authentication.Basic.0.23.2\lib\net40\Nancy.Authentication.Basic.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Nancy.Authentication.Forms">
|
<Reference Include="Nancy, Version=1.4.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Nancy.Authentication.Forms.0.23.2\lib\net40\Nancy.Authentication.Forms.dll</HintPath>
|
<HintPath>..\packages\Nancy.1.4.3\lib\net40\Nancy.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Nancy.Authentication.Basic, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll</HintPath>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Nancy.Authentication.Forms, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.3.4\lib\net40\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.4.3\lib\net40\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
</Reference>
|
||||||
|
<Reference Include="NodaTime, Version=1.3.0.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Ical.Net.2.2.32\lib\net40\NodaTime.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="DDay.iCal">
|
|
||||||
<HintPath>..\packages\DDay.iCal.1.0.2.575\lib\DDay.iCal.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\Libraries\Sqlite\System.Data.SQLite.dll</HintPath>
|
<HintPath>..\Libraries\Sqlite\System.Data.SQLite.dll</HintPath>
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.Validation;
|
using NzbDrone.Api.Validation;
|
||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Datastore;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using NzbDrone.Api.Episodes;
|
using NzbDrone.Api.Episodes;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Api.Series;
|
using NzbDrone.Api.Series;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Profiles.Languages
|
namespace NzbDrone.Api.Profiles.Languages
|
||||||
@@ -9,6 +8,6 @@ namespace NzbDrone.Api.Profiles.Languages
|
|||||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)]
|
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Include)]
|
||||||
public new int Id { get; set; }
|
public new int Id { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string NameLower { get { return Name.ToLowerInvariant(); } }
|
public string NameLower => Name.ToLowerInvariant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Text;
|
||||||
using System.Text;
|
|
||||||
using Nancy;
|
using Nancy;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Profiles
|
namespace NzbDrone.Api.Profiles
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using NzbDrone.Core.Profiles;
|
using NzbDrone.Core.Profiles;
|
||||||
using NzbDrone.Core.Qualities;
|
|
||||||
using NzbDrone.Core.Validation;
|
using NzbDrone.Core.Validation;
|
||||||
|
|
||||||
namespace NzbDrone.Api.Profiles
|
namespace NzbDrone.Api.Profiles
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.Parser;
|
using NzbDrone.Core.Parser;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using FluentValidation;
|
using FluentValidation;
|
||||||
using FluentValidation.Results;
|
using FluentValidation.Results;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
|
|||||||
@@ -8,12 +8,6 @@ namespace NzbDrone.Api.REST
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual string ResourceName
|
public virtual string ResourceName => GetType().Name.ToLowerInvariant().Replace("resource", "");
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return GetType().Name.ToLowerInvariant().Replace("resource", "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.RemotePathMappings;
|
using NzbDrone.Core.RemotePathMappings;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using FluentValidation.Results;
|
using FluentValidation.Results;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Restrictions;
|
using NzbDrone.Core.Restrictions;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.Restrictions;
|
using NzbDrone.Core.Restrictions;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NzbDrone.Api.REST;
|
using NzbDrone.Api.REST;
|
||||||
using NzbDrone.Core.RootFolders;
|
using NzbDrone.Core.RootFolders;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using Nancy;
|
||||||
using Nancy;
|
|
||||||
using NzbDrone.Api.Extensions;
|
using NzbDrone.Api.Extensions;
|
||||||
using NzbDrone.Core.Tv;
|
using NzbDrone.Core.Tv;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System;
|
namespace NzbDrone.Api.Series
|
||||||
|
|
||||||
namespace NzbDrone.Api.Series
|
|
||||||
{
|
{
|
||||||
public class AlternateTitleResource
|
public class AlternateTitleResource
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace NzbDrone.Api.Series
|
|||||||
|
|
||||||
public static List<Season> ToModel(this IEnumerable<SeasonResource> resources)
|
public static List<Season> ToModel(this IEnumerable<SeasonResource> resources)
|
||||||
{
|
{
|
||||||
return resources.Select(ToModel).ToList();
|
return resources?.Select(ToModel).ToList() ?? new List<Season>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,12 +29,14 @@ namespace NzbDrone.Api.Series
|
|||||||
|
|
||||||
{
|
{
|
||||||
private readonly ISeriesService _seriesService;
|
private readonly ISeriesService _seriesService;
|
||||||
|
private readonly IAddSeriesService _addSeriesService;
|
||||||
private readonly ISeriesStatisticsService _seriesStatisticsService;
|
private readonly ISeriesStatisticsService _seriesStatisticsService;
|
||||||
private readonly ISceneMappingService _sceneMappingService;
|
private readonly ISceneMappingService _sceneMappingService;
|
||||||
private readonly IMapCoversToLocal _coverMapper;
|
private readonly IMapCoversToLocal _coverMapper;
|
||||||
|
|
||||||
public SeriesModule(IBroadcastSignalRMessage signalRBroadcaster,
|
public SeriesModule(IBroadcastSignalRMessage signalRBroadcaster,
|
||||||
ISeriesService seriesService,
|
ISeriesService seriesService,
|
||||||
|
IAddSeriesService addSeriesService,
|
||||||
ISeriesStatisticsService seriesStatisticsService,
|
ISeriesStatisticsService seriesStatisticsService,
|
||||||
ISceneMappingService sceneMappingService,
|
ISceneMappingService sceneMappingService,
|
||||||
IMapCoversToLocal coverMapper,
|
IMapCoversToLocal coverMapper,
|
||||||
@@ -48,6 +50,7 @@ namespace NzbDrone.Api.Series
|
|||||||
: base(signalRBroadcaster)
|
: base(signalRBroadcaster)
|
||||||
{
|
{
|
||||||
_seriesService = seriesService;
|
_seriesService = seriesService;
|
||||||
|
_addSeriesService = addSeriesService;
|
||||||
_seriesStatisticsService = seriesStatisticsService;
|
_seriesStatisticsService = seriesStatisticsService;
|
||||||
_sceneMappingService = sceneMappingService;
|
_sceneMappingService = sceneMappingService;
|
||||||
|
|
||||||
@@ -74,7 +77,6 @@ namespace NzbDrone.Api.Series
|
|||||||
|
|
||||||
PostValidator.RuleFor(s => s.Path).IsValidPath().When(s => s.RootFolderPath.IsNullOrWhiteSpace());
|
PostValidator.RuleFor(s => s.Path).IsValidPath().When(s => s.RootFolderPath.IsNullOrWhiteSpace());
|
||||||
PostValidator.RuleFor(s => s.RootFolderPath).IsValidPath().When(s => s.Path.IsNullOrWhiteSpace());
|
PostValidator.RuleFor(s => s.RootFolderPath).IsValidPath().When(s => s.Path.IsNullOrWhiteSpace());
|
||||||
PostValidator.RuleFor(s => s.Title).NotEmpty();
|
|
||||||
PostValidator.RuleFor(s => s.TvdbId).GreaterThan(0).SetValidator(seriesExistsValidator);
|
PostValidator.RuleFor(s => s.TvdbId).GreaterThan(0).SetValidator(seriesExistsValidator);
|
||||||
|
|
||||||
PutValidator.RuleFor(s => s.Path).IsValidPath();
|
PutValidator.RuleFor(s => s.Path).IsValidPath();
|
||||||
@@ -114,7 +116,7 @@ namespace NzbDrone.Api.Series
|
|||||||
{
|
{
|
||||||
var model = seriesResource.ToModel();
|
var model = seriesResource.ToModel();
|
||||||
|
|
||||||
return _seriesService.AddSeries(model).Id;
|
return _addSeriesService.AddSeries(model).Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSeries(SeriesResource seriesResource)
|
private void UpdateSeries(SeriesResource seriesResource)
|
||||||
@@ -180,7 +182,7 @@ namespace NzbDrone.Api.Series
|
|||||||
|
|
||||||
foreach (var season in resource.Seasons)
|
foreach (var season in resource.Seasons)
|
||||||
{
|
{
|
||||||
season.Statistics = SeasonStatisticsResourceMapper.ToResource(dictSeasonStats.GetValueOrDefault(season.SeasonNumber));
|
season.Statistics = dictSeasonStats.GetValueOrDefault(season.SeasonNumber).ToResource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,19 +207,9 @@ namespace NzbDrone.Api.Series
|
|||||||
|
|
||||||
public static Core.Tv.Series ToModel(this SeriesResource resource, Core.Tv.Series series)
|
public static Core.Tv.Series ToModel(this SeriesResource resource, Core.Tv.Series series)
|
||||||
{
|
{
|
||||||
series.TvdbId = resource.TvdbId;
|
var updatedSeries = resource.ToModel();
|
||||||
|
|
||||||
series.Seasons = resource.Seasons.ToModel();
|
series.ApplyChanges(updatedSeries);
|
||||||
series.Path = resource.Path;
|
|
||||||
series.ProfileId = resource.ProfileId;
|
|
||||||
|
|
||||||
series.SeasonFolder = resource.SeasonFolder;
|
|
||||||
series.Monitored = resource.Monitored;
|
|
||||||
|
|
||||||
series.SeriesType = resource.SeriesType;
|
|
||||||
series.RootFolderPath = resource.RootFolderPath;
|
|
||||||
series.Tags = resource.Tags;
|
|
||||||
series.AddOptions = resource.AddOptions;
|
|
||||||
|
|
||||||
return series;
|
return series;
|
||||||
}
|
}
|
||||||
|
|||||||