Update TorrentSyndikat.cs (#2128)

Add imdb support
This commit is contained in:
ZackEndboss
2017-11-13 09:42:25 +01:00
committed by flightlevel
parent 1c62504b22
commit b1d55fdf00

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
@@ -45,6 +45,8 @@ namespace Jackett.Indexers
Language = "de-de";
Type = "private";
TorznabCaps.SupportsImdbSearch = true;
this.configData.DisplayText.Value = "Only the results from the first search result page are shown, adjust your profile settings to show the maximum.";
this.configData.DisplayText.Name = "Notice";
@@ -125,9 +127,17 @@ namespace Jackett.Indexers
var searchString = query.GetQueryString();
var searchUrl = SearchUrl;
var queryCollection = new NameValueCollection();
queryCollection.Add("searchin", "title");
queryCollection.Add("incldead", "1");
queryCollection.Add("rel_type", "0"); // Alle
if(query.ImdbID != null)
{
queryCollection.Add("searchin", "imdb");
queryCollection.Add("search", query.ImdbID);
} else {
queryCollection.Add("searchin", "title");
if (!string.IsNullOrWhiteSpace(searchString))
{
// use AND+wildcard operator to avoid getting to many useless results
@@ -139,6 +149,7 @@ namespace Jackett.Indexers
queryCollection.Add("search", searchStringFinal);
}
}
foreach (var cat in MapTorznabCapsToTrackers(query))
{
queryCollection.Add("c" + cat, "1");