mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
removed Nzbx
This commit is contained in:
parent
54c36e9264
commit
966b9d62b7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
[{"ID":"571777","name":"Chicago.Fire.S01E10.720p.WEB-DL.DD5.1.H.264-KiNGS","totalpart":"10","groupID":"99","size":"890190951","postdate":"2012-12-20 18:14:13","guid":"48714abb00a095e00fbcbe161253abf6","fromname":"#cripples <masturb@ting.in.wheelchairs>","completion":"100","categoryID":"5050","imdbID":null,"anidbID":null,"rageID":"-1","comments":"0","downloads":"3","votes":{"upvotes":0,"downvotes":0}}]
|
|
@ -1 +0,0 @@
|
|||||||
[{"name":"30.Rock.S06E06E07.HDTV.XviD-LOL","fromname":"teevee@4u.tv (teevee)","size":418067671,"groupid":4,"categoryid":5030,"totalpart":36,"completion":100,"rageid":"-1","imdbid":"","comments":"0","guid":"97be14dbf1776eec4fb8f2bb835935c0","adddate":1355343562,"postdate":1328839361,"downloads":"0","votes":{"upvotes":0,"downvotes":0},"nzb":"https:\/\/nzbx.co\/nzb?97be14dbf1776eec4fb8f2bb835935c0*|*30.Rock.S06E06E07.HDTV.XviD-LOL"}]
|
|
@ -117,7 +117,7 @@ public void SetupReadDb()
|
|||||||
[TearDown]
|
[TearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
if (TestFolderInfo != null)
|
if (TestFolderInfo != null && Directory.Exists(TestFolderInfo.AppDataFolder))
|
||||||
{
|
{
|
||||||
var files = Directory.GetFiles(TestFolderInfo.AppDataFolder);
|
var files = Directory.GetFiles(TestFolderInfo.AppDataFolder);
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
using NzbDrone.Core.Indexers;
|
using NzbDrone.Core.Indexers;
|
||||||
using NzbDrone.Core.Indexers.Newznab;
|
using NzbDrone.Core.Indexers.Newznab;
|
||||||
using NzbDrone.Core.Indexers.NzbClub;
|
using NzbDrone.Core.Indexers.NzbClub;
|
||||||
using NzbDrone.Core.Indexers.Nzbx;
|
|
||||||
using NzbDrone.Core.Indexers.Wombles;
|
using NzbDrone.Core.Indexers.Wombles;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.Core.Test.Framework;
|
using NzbDrone.Core.Test.Framework;
|
||||||
@ -33,18 +32,6 @@ public void nzbclub_rss()
|
|||||||
ValidateResult(result);
|
ValidateResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void nzbx_rss()
|
|
||||||
{
|
|
||||||
var indexer = new Nzbx();
|
|
||||||
|
|
||||||
var result = Subject.FetchRss(indexer);
|
|
||||||
|
|
||||||
ValidateResult(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void wombles_rss()
|
public void wombles_rss()
|
||||||
{
|
{
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
using NzbDrone.Core.Indexers.Nzbx;
|
|
||||||
using NzbDrone.Core.Test.Framework;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using System.Linq;
|
|
||||||
using FluentAssertions;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.IndexerTests.ParserTests
|
|
||||||
{
|
|
||||||
public class NzbxParserFixture : CoreTest<NzbxParser>
|
|
||||||
{
|
|
||||||
[Test]
|
|
||||||
public void should_be_able_to_parse_json()
|
|
||||||
{
|
|
||||||
var stream = OpenRead("Files", "Indexers", "Nzbx", "nzbx_recent.json");
|
|
||||||
|
|
||||||
var result = Subject.Process(stream).ToList();
|
|
||||||
|
|
||||||
result.Should().NotBeEmpty();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -142,7 +142,6 @@
|
|||||||
<Compile Include="IndexerTests\BasicRssParserFixture.cs" />
|
<Compile Include="IndexerTests\BasicRssParserFixture.cs" />
|
||||||
<Compile Include="IndexerTests\IndexerServiceFixture.cs" />
|
<Compile Include="IndexerTests\IndexerServiceFixture.cs" />
|
||||||
<Compile Include="IndexerTests\IntegrationTests\IndexerIntegrationTests.cs" />
|
<Compile Include="IndexerTests\IntegrationTests\IndexerIntegrationTests.cs" />
|
||||||
<Compile Include="IndexerTests\ParserTests\NzbxParserFixture.cs" />
|
|
||||||
<Compile Include="JobTests\JobRepositoryFixture.cs" />
|
<Compile Include="JobTests\JobRepositoryFixture.cs" />
|
||||||
<Compile Include="DecisionEngineTests\LanguageSpecificationFixture.cs" />
|
<Compile Include="DecisionEngineTests\LanguageSpecificationFixture.cs" />
|
||||||
<Compile Include="JobTests\TestJobs.cs" />
|
<Compile Include="JobTests\TestJobs.cs" />
|
||||||
@ -279,12 +278,6 @@
|
|||||||
<None Include="..\NzbDrone.Test.Common\App.config">
|
<None Include="..\NzbDrone.Test.Common\App.config">
|
||||||
<Link>App.config</Link>
|
<Link>App.config</Link>
|
||||||
</None>
|
</None>
|
||||||
<None Include="Files\Indexers\Nzbx\nzbx_search.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Files\Indexers\Nzbx\nzbx_recent.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<Content Include="Files\RSS\omgwtfnzbs.xml">
|
<Content Include="Files\RSS\omgwtfnzbs.xml">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@ -342,12 +335,6 @@
|
|||||||
<Content Include="Files\Xem\Mappings.txt">
|
<Content Include="Files\Xem\Mappings.txt">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<None Include="Files\RSS\SizeParsing\nzbx_recent.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Files\RSS\SizeParsing\nzbx_search.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="Files\SceneMappings.json">
|
<None Include="Files\SceneMappings.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
@ -357,6 +344,7 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Folder Include="Files\Indexers\" />
|
||||||
<Folder Include="ProviderTests\UpdateProviderTests\" />
|
<Folder Include="ProviderTests\UpdateProviderTests\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Indexers.Nzbx
|
|
||||||
{
|
|
||||||
public class Nzbx : IndexerBase
|
|
||||||
{
|
|
||||||
public override IParseFeed Parser
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new NzbxParser();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Name
|
|
||||||
{
|
|
||||||
get { return "nzbx"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<string> RecentFeed
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new[] { String.Format("https://nzbx.co/api/recent?category=tv") };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override IEnumerable<string> GetEpisodeSearchUrls(string seriesTitle, int seasonNumber, int episodeNumber)
|
|
||||||
{
|
|
||||||
yield return String.Format("https://nzbx.co/api/search?q={0}+S{1:00}E{2:00}", seriesTitle, seasonNumber, episodeNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<string> GetDailyEpisodeSearchUrls(string seriesTitle, DateTime date)
|
|
||||||
{
|
|
||||||
yield return String.Format("https://nzbx.co/api/search?q={0}+{1:yyyy MM dd}", seriesTitle, date);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<string> GetSeasonSearchUrls(string seriesTitle, int seasonNumber)
|
|
||||||
{
|
|
||||||
yield return String.Format("https://nzbx.co/api/search?q={0}+S{1:00}", seriesTitle, seasonNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override IEnumerable<string> GetPartialSeasonSearchUrls(string seriesTitle, int seasonNumber, int episodeWildcard)
|
|
||||||
{
|
|
||||||
yield return String.Format("https://nzbx.co/api/search?q={0}+S{1:00}E{2}", seriesTitle, seasonNumber, episodeWildcard);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,51 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using NLog;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using NzbDrone.Core.Parser.Model;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Indexers.Nzbx
|
|
||||||
{
|
|
||||||
public class NzbxParser : IParseFeed
|
|
||||||
{
|
|
||||||
private readonly Logger _logger;
|
|
||||||
private readonly JsonSerializer _serializer;
|
|
||||||
|
|
||||||
public NzbxParser()
|
|
||||||
{
|
|
||||||
_logger = LogManager.GetCurrentClassLogger();
|
|
||||||
_serializer = new JsonSerializer();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<ReportInfo> Process(Stream source)
|
|
||||||
{
|
|
||||||
var result = new List<ReportInfo>();
|
|
||||||
var jsonReader = new JsonTextReader(new StreamReader(source));
|
|
||||||
var feed = _serializer.Deserialize<List<NzbxRecentItem>>(jsonReader);
|
|
||||||
|
|
||||||
foreach (var item in feed.Where(c => !string.IsNullOrWhiteSpace(c.Name)))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var reportInfo = new ReportInfo();
|
|
||||||
reportInfo.Age = DateTime.Now.Date.Subtract(item.PostDate).Days;
|
|
||||||
reportInfo.Title = item.Name;
|
|
||||||
reportInfo.NzbUrl = String.Format("http://nzbx.co/nzb?{0}*|*{1}", item.Guid, item.Name);
|
|
||||||
reportInfo.NzbInfoUrl = String.Format("http://nzbx.co/d?{0}", item.Guid);
|
|
||||||
reportInfo.Size = item.Size;
|
|
||||||
|
|
||||||
result.Add(reportInfo);
|
|
||||||
}
|
|
||||||
catch (Exception itemEx)
|
|
||||||
{
|
|
||||||
itemEx.Data.Add("Item", item.Name);
|
|
||||||
_logger.ErrorException("An error occurred while processing feed item", itemEx);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Indexers.Nzbx
|
|
||||||
{
|
|
||||||
public class NzbxRecentItem
|
|
||||||
{
|
|
||||||
//"ID": "571777",
|
|
||||||
//"name": "Cak4QCQG",
|
|
||||||
//"totalpart": "10",
|
|
||||||
//"groupID": "99",
|
|
||||||
//"size": "890190951",
|
|
||||||
//"postdate": "2012-12-20 18:14:13",
|
|
||||||
//"guid": "48714abb00a095e00fbcbe161253abf6",
|
|
||||||
//"fromname": "#cripples <masturb@ting.in.wheelchairs>",
|
|
||||||
//"completion": "100",
|
|
||||||
//"categoryID": "5050",
|
|
||||||
//"imdbID": null,
|
|
||||||
//"anidbID": null,
|
|
||||||
//"rageID": "-1",
|
|
||||||
//"comments": "0",
|
|
||||||
//"downloads": "3",
|
|
||||||
//"votes": {
|
|
||||||
// "upvotes": 0,
|
|
||||||
// "downvotes": 0
|
|
||||||
//}
|
|
||||||
|
|
||||||
public string Name { get; set; }
|
|
||||||
public long Size { get; set; }
|
|
||||||
public DateTime PostDate { get; set; }
|
|
||||||
public string Guid { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -316,8 +316,6 @@
|
|||||||
<Compile Include="Indexers\Newznab\NewznabParser.cs" />
|
<Compile Include="Indexers\Newznab\NewznabParser.cs" />
|
||||||
<Compile Include="Indexers\NzbClub\NzbClub.cs" />
|
<Compile Include="Indexers\NzbClub\NzbClub.cs" />
|
||||||
<Compile Include="Indexers\NzbClub\NzbClubParser.cs" />
|
<Compile Include="Indexers\NzbClub\NzbClubParser.cs" />
|
||||||
<Compile Include="Indexers\Nzbx\Nzbx.cs" />
|
|
||||||
<Compile Include="Indexers\Nzbx\NzbxParser.cs" />
|
|
||||||
<Compile Include="Indexers\Omgwtfnzbs\Omgwtfnzbs.cs" />
|
<Compile Include="Indexers\Omgwtfnzbs\Omgwtfnzbs.cs" />
|
||||||
<Compile Include="Indexers\Omgwtfnzbs\OmgwtfnzbsParser.cs" />
|
<Compile Include="Indexers\Omgwtfnzbs\OmgwtfnzbsParser.cs" />
|
||||||
<Compile Include="Indexers\IIndexerSetting.cs" />
|
<Compile Include="Indexers\IIndexerSetting.cs" />
|
||||||
@ -374,7 +372,6 @@
|
|||||||
<Compile Include="Download\Clients\Nzbget\NzbGetQueueItem.cs" />
|
<Compile Include="Download\Clients\Nzbget\NzbGetQueueItem.cs" />
|
||||||
<Compile Include="Download\Clients\Nzbget\PriorityType.cs" />
|
<Compile Include="Download\Clients\Nzbget\PriorityType.cs" />
|
||||||
<Compile Include="Download\Clients\Nzbget\VersionModel.cs" />
|
<Compile Include="Download\Clients\Nzbget\VersionModel.cs" />
|
||||||
<Compile Include="Indexers\Nzbx\NzbxRecentItem.cs" />
|
|
||||||
<Compile Include="Model\MisnamedEpisodeModel.cs" />
|
<Compile Include="Model\MisnamedEpisodeModel.cs" />
|
||||||
<Compile Include="Organizer\NamingConfig.cs" />
|
<Compile Include="Organizer\NamingConfig.cs" />
|
||||||
<Compile Include="Parser\Language.cs" />
|
<Compile Include="Parser\Language.cs" />
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<SolutionConfiguration>
|
<SolutionConfiguration>
|
||||||
<FileVersion>1</FileVersion>
|
<FileVersion>1</FileVersion>
|
||||||
<AutoEnableOnStartup>False</AutoEnableOnStartup>
|
<AutoEnableOnStartup>True</AutoEnableOnStartup>
|
||||||
<AllowParallelTestExecution>true</AllowParallelTestExecution>
|
<AllowParallelTestExecution>true</AllowParallelTestExecution>
|
||||||
<AllowTestsToRunInParallelWithThemselves>true</AllowTestsToRunInParallelWithThemselves>
|
<AllowTestsToRunInParallelWithThemselves>true</AllowTestsToRunInParallelWithThemselves>
|
||||||
<FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit>
|
<FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit>
|
||||||
|
Loading…
Reference in New Issue
Block a user