mirror of
https://github.com/Jackett/Jackett
synced 2025-02-24 23:22:46 +00:00
Fix Strike indexer
This commit is contained in:
parent
748d85f32f
commit
28bc720ab3
3 changed files with 25 additions and 6 deletions
|
@ -30,9 +30,9 @@ namespace Jackett.Indexers
|
||||||
private string SearchUrl { get { return BaseUri + "api/v2/torrents/search/?category=TV&phrase={0}"; } }
|
private string SearchUrl { get { return BaseUri + "api/v2/torrents/search/?category=TV&phrase={0}"; } }
|
||||||
private string DownloadUrl { get { return BaseUri + "torrents/api/download/{0}.torrent"; } }
|
private string DownloadUrl { get { return BaseUri + "torrents/api/download/{0}.torrent"; } }
|
||||||
|
|
||||||
new ConfigurationDataUrl configData
|
new ConfigurationDataStrike configData
|
||||||
{
|
{
|
||||||
get { return (ConfigurationDataUrl)base.configData; }
|
get { return (ConfigurationDataStrike)base.configData; }
|
||||||
set { base.configData = value; }
|
set { base.configData = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ namespace Jackett.Indexers
|
||||||
client: wc,
|
client: wc,
|
||||||
logger: l,
|
logger: l,
|
||||||
p: ps,
|
p: ps,
|
||||||
configData: new ConfigurationDataUrl(defaultSiteLink))
|
configData: new ConfigurationDataStrike(defaultSiteLink))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,9 +80,9 @@ namespace Jackett.Indexers
|
||||||
public async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
public async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||||
{
|
{
|
||||||
List<ReleaseInfo> releases = new List<ReleaseInfo>();
|
List<ReleaseInfo> releases = new List<ReleaseInfo>();
|
||||||
|
var queryString = query.GetQueryString();
|
||||||
var searchTerm = string.IsNullOrEmpty(query.SanitizedSearchTerm) ? "2015" : query.SanitizedSearchTerm;
|
var searchTerm = string.IsNullOrEmpty(queryString) ? DateTime.Now.Year.ToString() : queryString;
|
||||||
var episodeSearchUrl = string.Format(SearchUrl, HttpUtility.UrlEncode(query.GetQueryString()));
|
var episodeSearchUrl = string.Format(SearchUrl, HttpUtility.UrlEncode(searchTerm));
|
||||||
var results = await RequestStringWithCookiesAndRetry(episodeSearchUrl, string.Empty);
|
var results = await RequestStringWithCookiesAndRetry(episodeSearchUrl, string.Empty);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -223,6 +223,7 @@
|
||||||
<Compile Include="Models\IndexerConfig\ConfigurationDataNCore.cs" />
|
<Compile Include="Models\IndexerConfig\ConfigurationDataNCore.cs" />
|
||||||
<Compile Include="Models\IndexerConfig\ConfigurationDataCaptchaLogin.cs" />
|
<Compile Include="Models\IndexerConfig\ConfigurationDataCaptchaLogin.cs" />
|
||||||
<Compile Include="Models\IndexerConfig\ConfigurationDataAnimeBytes.cs" />
|
<Compile Include="Models\IndexerConfig\ConfigurationDataAnimeBytes.cs" />
|
||||||
|
<Compile Include="Models\IndexerConfig\ConfigurationDataStrike.cs" />
|
||||||
<Compile Include="Models\IndexerConfig\ConfigurationDataUrl.cs" />
|
<Compile Include="Models\IndexerConfig\ConfigurationDataUrl.cs" />
|
||||||
<Compile Include="Models\IndexerConfig\ISerializableConfig.cs" />
|
<Compile Include="Models\IndexerConfig\ISerializableConfig.cs" />
|
||||||
<Compile Include="Models\IndexerConfig\ConfigurationDataPinNumber.cs" />
|
<Compile Include="Models\IndexerConfig\ConfigurationDataPinNumber.cs" />
|
||||||
|
|
18
src/Jackett/Models/IndexerConfig/ConfigurationDataStrike.cs
Normal file
18
src/Jackett/Models/IndexerConfig/ConfigurationDataStrike.cs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Jackett.Models.IndexerConfig
|
||||||
|
{
|
||||||
|
public class ConfigurationDataStrike : ConfigurationDataUrl
|
||||||
|
{
|
||||||
|
public DisplayItem StrikeWarning { get; private set; }
|
||||||
|
|
||||||
|
public ConfigurationDataStrike(string url) : base(url)
|
||||||
|
{
|
||||||
|
StrikeWarning = new DisplayItem("This indexer does not support RSS Sync, only Search") { Name = "Warning" };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue