diff --git a/src/Jackett/IndexerInterface.cs b/src/Jackett/IndexerInterface.cs index e421d25d3..5027c9b32 100644 --- a/src/Jackett/IndexerInterface.cs +++ b/src/Jackett/IndexerInterface.cs @@ -10,22 +10,23 @@ namespace Jackett { public interface IndexerInterface { + + // Invoked when the indexer configuration has been applied and verified so the cookie needs to be saved + event Action OnSaveConfigurationRequested; + string DisplayName { get; } string DisplayDescription { get; } Uri SiteLink { get; } + // Whether this indexer has been configured, verified and saved in the past and has the settings required for functioning + bool IsConfigured { get; } + // Retrieved for starting setup for the indexer via web API Task GetConfigurationForSetup(); // Called when web API wants to apply setup configuration via web API, usually this is where login and storing cookie happens Task ApplyConfiguration(JToken configJson); - // Invoked when the indexer configuration has been applied and verified so the cookie needs to be saved - event Action OnSaveConfigurationRequested; - - // Whether this indexer has been configured, verified and saved in the past and has the settings required for functioning - bool IsConfigured { get; } - // Called on startup when initializing indexers from saved configuration void LoadFromSavedConfiguration(JToken jsonConfig); diff --git a/src/Jackett/Indexers/ThePirateBay.cs b/src/Jackett/Indexers/ThePirateBay.cs index e141187d0..443f2c173 100644 --- a/src/Jackett/Indexers/ThePirateBay.cs +++ b/src/Jackett/Indexers/ThePirateBay.cs @@ -22,7 +22,7 @@ namespace Jackett.Indexers public ThePirateBayConfig() { - Url = new StringItem { Name = "Url", Value = "https://thepiratebay.se" }; + Url = new StringItem { Name = "Url", Value = DefaultUrl }; } public override Item[] GetItems() @@ -37,12 +37,13 @@ namespace Jackett.Indexers public string DisplayDescription { get { return "The worlds largest bittorrent indexer"; } } - public Uri SiteLink { get { return new Uri("https://thepiratebay.se"); } } + public Uri SiteLink { get { return new Uri(DefaultUrl); } } public bool IsConfigured { get; private set; } - static string SearchUrl = "/s/?q=\"{0}\"&category=205&page=0&orderby=99"; - static string SwitchSingleViewUrl = "/switchview.php?view=s"; + const string DefaultUrl = "https://thepiratebay.se"; + const string SearchUrl = "/s/?q=\"{0}\"&category=205&page=0&orderby=99"; + const string SwitchSingleViewUrl = "/switchview.php?view=s"; string BaseUrl; @@ -169,8 +170,8 @@ namespace Jackett.Indexers } var downloadCol = row.ChildElements.ElementAt(3).Cq().Find("a"); - release.MagnetUrl = new Uri(downloadCol.Attr("href")); - release.InfoHash = release.MagnetUrl.ToString().Split(':')[3].Split('&')[0]; + release.MagnetUri = new Uri(downloadCol.Attr("href")); + release.InfoHash = release.MagnetUri.ToString().Split(':')[3].Split('&')[0]; var sizeString = row.ChildElements.ElementAt(4).Cq().Text().Split(' '); var sizeVal = float.Parse(sizeString[0]); diff --git a/src/Jackett/Jackett.csproj b/src/Jackett/Jackett.csproj index defff711b..bfd48e2df 100644 --- a/src/Jackett/Jackett.csproj +++ b/src/Jackett/Jackett.csproj @@ -94,6 +94,7 @@ + Form @@ -195,6 +196,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/src/Jackett/ReleaseInfo.cs b/src/Jackett/ReleaseInfo.cs index 4e9add6ba..da77ce505 100644 --- a/src/Jackett/ReleaseInfo.cs +++ b/src/Jackett/ReleaseInfo.cs @@ -24,7 +24,7 @@ namespace Jackett public Uri ConverUrl { get; set; } public Uri BannerUrl { get; set; } public string InfoHash { get; set; } - public Uri MagnetUrl { get; set; } + public Uri MagnetUri { get; set; } public double? MinimumRatio { get; set; } public long? MinimumSeedTime { get; set; } diff --git a/src/Jackett/ResultPage.cs b/src/Jackett/ResultPage.cs index 1cd80b923..9514e036c 100644 --- a/src/Jackett/ResultPage.cs +++ b/src/Jackett/ResultPage.cs @@ -73,15 +73,15 @@ namespace Jackett new XElement("pubDate", xmlDateFormat(r.PublishDate)), new XElement("size", r.Size), new XElement("description", r.Description), - new XElement("link", r.Link ?? r.MagnetUrl), + new XElement("link", r.Link ?? r.MagnetUri), r.Category == null ? null : new XElement("category", r.Category), new XElement( "enclosure", - new XAttribute("url", r.Link ?? r.MagnetUrl), + new XAttribute("url", r.Link ?? r.MagnetUri), new XAttribute("length", r.Size), new XAttribute("type", "application/x-bittorrent") ), - getTorznabElement("magneturl", r.MagnetUrl), + getTorznabElement("magneturl", r.MagnetUri), getTorznabElement("rageid", r.RageID), getTorznabElement("seeders", r.Seeders), getTorznabElement("peers", r.Peers), diff --git a/src/Jackett/WebContent/logos/strike.png b/src/Jackett/WebContent/logos/strike.png new file mode 100644 index 000000000..44a1b63aa Binary files /dev/null and b/src/Jackett/WebContent/logos/strike.png differ