2015-07-19 00:27:41 +00:00
|
|
|
|
using Jackett.Models;
|
2015-08-03 21:38:45 +00:00
|
|
|
|
using Jackett.Models.IndexerConfig;
|
2015-07-19 00:27:41 +00:00
|
|
|
|
using Newtonsoft.Json.Linq;
|
2015-04-13 06:25:21 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
2015-04-13 14:25:41 +00:00
|
|
|
|
using System.Web.UI.WebControls;
|
2015-04-13 06:25:21 +00:00
|
|
|
|
|
2015-07-19 13:22:50 +00:00
|
|
|
|
namespace Jackett.Indexers
|
2015-04-13 06:25:21 +00:00
|
|
|
|
{
|
2015-07-19 13:22:50 +00:00
|
|
|
|
public interface IIndexer
|
2015-04-13 06:25:21 +00:00
|
|
|
|
{
|
2015-07-27 00:03:51 +00:00
|
|
|
|
string SiteLink { get; }
|
2017-01-02 20:39:28 +00:00
|
|
|
|
string[] AlternativeSiteLinks { get; }
|
2015-07-27 00:03:51 +00:00
|
|
|
|
|
2015-04-13 14:25:41 +00:00
|
|
|
|
string DisplayName { get; }
|
|
|
|
|
string DisplayDescription { get; }
|
2016-12-02 17:58:10 +00:00
|
|
|
|
string Language { get; }
|
2016-12-05 10:43:07 +00:00
|
|
|
|
string LastError { get; set; }
|
2015-07-19 19:28:08 +00:00
|
|
|
|
string ID { get; }
|
|
|
|
|
|
2015-07-19 23:05:30 +00:00
|
|
|
|
TorznabCapabilities TorznabCaps { get; }
|
2015-07-18 20:35:02 +00:00
|
|
|
|
|
2015-04-25 19:37:03 +00:00
|
|
|
|
// Whether this indexer has been configured, verified and saved in the past and has the settings required for functioning
|
2017-01-02 20:39:28 +00:00
|
|
|
|
bool IsConfigured { get; }
|
|
|
|
|
|
|
|
|
|
// Retrieved for starting setup for the indexer via web API
|
2015-04-13 06:25:21 +00:00
|
|
|
|
Task<ConfigurationData> GetConfigurationForSetup();
|
|
|
|
|
|
|
|
|
|
// Called when web API wants to apply setup configuration via web API, usually this is where login and storing cookie happens
|
2015-08-22 20:57:13 +00:00
|
|
|
|
Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson);
|
2015-04-13 06:25:21 +00:00
|
|
|
|
|
|
|
|
|
// Called on startup when initializing indexers from saved configuration
|
|
|
|
|
void LoadFromSavedConfiguration(JToken jsonConfig);
|
2015-04-16 06:04:28 +00:00
|
|
|
|
|
2015-07-28 23:10:04 +00:00
|
|
|
|
Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query);
|
|
|
|
|
|
|
|
|
|
IEnumerable<ReleaseInfo> FilterResults(TorznabQuery query, IEnumerable<ReleaseInfo> input);
|
2015-04-17 03:53:52 +00:00
|
|
|
|
|
|
|
|
|
Task<byte[]> Download(Uri link);
|
2015-08-13 21:51:49 +00:00
|
|
|
|
|
|
|
|
|
IEnumerable<ReleaseInfo> CleanLinks(IEnumerable<ReleaseInfo> releases);
|
|
|
|
|
Uri UncleanLink(Uri link);
|
2015-04-13 06:25:21 +00:00
|
|
|
|
}
|
|
|
|
|
}
|