Added getstrike.net

This commit is contained in:
zone117x
2015-04-25 13:37:03 -06:00
parent 8cf45a5e45
commit 9a4c5ffe5c
6 changed files with 22 additions and 16 deletions

View File

@@ -10,22 +10,23 @@ namespace Jackett
{ {
public interface IndexerInterface public interface IndexerInterface
{ {
// Invoked when the indexer configuration has been applied and verified so the cookie needs to be saved
event Action<IndexerInterface, JToken> OnSaveConfigurationRequested;
string DisplayName { get; } string DisplayName { get; }
string DisplayDescription { get; } string DisplayDescription { get; }
Uri SiteLink { 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 // Retrieved for starting setup for the indexer via web API
Task<ConfigurationData> GetConfigurationForSetup(); Task<ConfigurationData> GetConfigurationForSetup();
// Called when web API wants to apply setup configuration via web API, usually this is where login and storing cookie happens // 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); Task ApplyConfiguration(JToken configJson);
// Invoked when the indexer configuration has been applied and verified so the cookie needs to be saved
event Action<IndexerInterface, JToken> 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 // Called on startup when initializing indexers from saved configuration
void LoadFromSavedConfiguration(JToken jsonConfig); void LoadFromSavedConfiguration(JToken jsonConfig);

View File

@@ -22,7 +22,7 @@ namespace Jackett.Indexers
public ThePirateBayConfig() public ThePirateBayConfig()
{ {
Url = new StringItem { Name = "Url", Value = "https://thepiratebay.se" }; Url = new StringItem { Name = "Url", Value = DefaultUrl };
} }
public override Item[] GetItems() public override Item[] GetItems()
@@ -37,12 +37,13 @@ namespace Jackett.Indexers
public string DisplayDescription { get { return "The worlds largest bittorrent indexer"; } } 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; } public bool IsConfigured { get; private set; }
static string SearchUrl = "/s/?q=\"{0}\"&category=205&page=0&orderby=99"; const string DefaultUrl = "https://thepiratebay.se";
static string SwitchSingleViewUrl = "/switchview.php?view=s"; const string SearchUrl = "/s/?q=\"{0}\"&category=205&page=0&orderby=99";
const string SwitchSingleViewUrl = "/switchview.php?view=s";
string BaseUrl; string BaseUrl;
@@ -169,8 +170,8 @@ namespace Jackett.Indexers
} }
var downloadCol = row.ChildElements.ElementAt(3).Cq().Find("a"); var downloadCol = row.ChildElements.ElementAt(3).Cq().Find("a");
release.MagnetUrl = new Uri(downloadCol.Attr("href")); release.MagnetUri = new Uri(downloadCol.Attr("href"));
release.InfoHash = release.MagnetUrl.ToString().Split(':')[3].Split('&')[0]; release.InfoHash = release.MagnetUri.ToString().Split(':')[3].Split('&')[0];
var sizeString = row.ChildElements.ElementAt(4).Cq().Text().Split(' '); var sizeString = row.ChildElements.ElementAt(4).Cq().Text().Split(' ');
var sizeVal = float.Parse(sizeString[0]); var sizeVal = float.Parse(sizeString[0]);

View File

@@ -94,6 +94,7 @@
<Compile Include="Indexers\Freshon.cs" /> <Compile Include="Indexers\Freshon.cs" />
<Compile Include="Indexers\IPTorrents.cs" /> <Compile Include="Indexers\IPTorrents.cs" />
<Compile Include="Indexers\MoreThanTV.cs" /> <Compile Include="Indexers\MoreThanTV.cs" />
<Compile Include="Indexers\Strike.cs" />
<Compile Include="Indexers\ThePirateBay.cs" /> <Compile Include="Indexers\ThePirateBay.cs" />
<Compile Include="Main.cs"> <Compile Include="Main.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
@@ -195,6 +196,9 @@
<Content Include="WebContent\logos\rarbg.png"> <Content Include="WebContent\logos\rarbg.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="WebContent\logos\strike.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="WebContent\logos\thepiratebay.png"> <Content Include="WebContent\logos\thepiratebay.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>

View File

@@ -24,7 +24,7 @@ namespace Jackett
public Uri ConverUrl { get; set; } public Uri ConverUrl { get; set; }
public Uri BannerUrl { get; set; } public Uri BannerUrl { get; set; }
public string InfoHash { get; set; } public string InfoHash { get; set; }
public Uri MagnetUrl { get; set; } public Uri MagnetUri { get; set; }
public double? MinimumRatio { get; set; } public double? MinimumRatio { get; set; }
public long? MinimumSeedTime { get; set; } public long? MinimumSeedTime { get; set; }

View File

@@ -73,15 +73,15 @@ namespace Jackett
new XElement("pubDate", xmlDateFormat(r.PublishDate)), new XElement("pubDate", xmlDateFormat(r.PublishDate)),
new XElement("size", r.Size), new XElement("size", r.Size),
new XElement("description", r.Description), 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), r.Category == null ? null : new XElement("category", r.Category),
new XElement( new XElement(
"enclosure", "enclosure",
new XAttribute("url", r.Link ?? r.MagnetUrl), new XAttribute("url", r.Link ?? r.MagnetUri),
new XAttribute("length", r.Size), new XAttribute("length", r.Size),
new XAttribute("type", "application/x-bittorrent") new XAttribute("type", "application/x-bittorrent")
), ),
getTorznabElement("magneturl", r.MagnetUrl), getTorznabElement("magneturl", r.MagnetUri),
getTorznabElement("rageid", r.RageID), getTorznabElement("rageid", r.RageID),
getTorznabElement("seeders", r.Seeders), getTorznabElement("seeders", r.Seeders),
getTorznabElement("peers", r.Peers), getTorznabElement("peers", r.Peers),

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB