1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-01-01 12:46:23 +00:00

Readded SpeedCD to solution

This commit is contained in:
unknown 2015-07-19 10:35:34 -06:00
parent 9b1c0eb0c0
commit 7aecb9ac68
3 changed files with 14 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -1,5 +1,8 @@
using CsQuery; using CsQuery;
using Jackett.Models;
using Jackett.Utils;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using NLog;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
@ -13,11 +16,11 @@ using System.Web;
namespace Jackett.Indexers namespace Jackett.Indexers
{ {
public class SpeedCD : IndexerInterface public class SpeedCD : IIndexer
{ {
public event Action<IndexerInterface, JToken> OnSaveConfigurationRequested; public event Action<IIndexer, JToken> OnSaveConfigurationRequested;
public event Action<IndexerInterface, string, Exception> OnResultParsingError; public event Action<IIndexer, string, Exception> OnResultParsingError;
public string DisplayName { get { return "Speed.cd"; } } public string DisplayName { get { return "Speed.cd"; } }
@ -37,11 +40,13 @@ namespace Jackett.Indexers
CookieContainer cookies; CookieContainer cookies;
HttpClientHandler handler; HttpClientHandler handler;
HttpClient client; HttpClient client;
Logger logger;
public bool IsConfigured { get; private set; } public bool IsConfigured { get; private set; }
public SpeedCD() public SpeedCD(Logger l)
{ {
logger = l;
IsConfigured = false; IsConfigured = false;
cookies = new CookieContainer(); cookies = new CookieContainer();
handler = new HttpClientHandler handler = new HttpClientHandler
@ -94,7 +99,7 @@ namespace Jackett.Indexers
public void LoadFromSavedConfiguration(JToken jsonConfig) public void LoadFromSavedConfiguration(JToken jsonConfig)
{ {
cookies.FillFromJson(new Uri(BaseUrl), jsonConfig); cookies.FillFromJson(new Uri(BaseUrl), jsonConfig, logger);
IsConfigured = true; IsConfigured = true;
} }

View file

@ -139,6 +139,7 @@
<Compile Include="Controllers\DownloadController.cs" /> <Compile Include="Controllers\DownloadController.cs" />
<Compile Include="Engine.cs" /> <Compile Include="Engine.cs" />
<Compile Include="Indexers\BaseIndexer.cs" /> <Compile Include="Indexers\BaseIndexer.cs" />
<Compile Include="Indexers\SpeedCD.cs" />
<Compile Include="Models\Config\ServerConfig.cs" /> <Compile Include="Models\Config\ServerConfig.cs" />
<Compile Include="Services\ProcessService.cs" /> <Compile Include="Services\ProcessService.cs" />
<Compile Include="Services\SerializeService.cs" /> <Compile Include="Services\SerializeService.cs" />
@ -241,6 +242,9 @@
<Content Include="Content\logos\showrss.png"> <Content Include="Content\logos\showrss.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Content\logos\speedcd.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Content\logos\t411.png"> <Content Include="Content\logos\t411.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>