mirror of
https://github.com/Jackett/Jackett
synced 2025-03-09 21:54:51 +00:00
filelist: add alternative link and skip non-fl results when freeleech only is set (#13946)
This commit is contained in:
parent
329c17ab25
commit
40acf3c4a7
2 changed files with 13 additions and 4 deletions
|
@ -18,11 +18,14 @@ namespace Jackett.Common.Indexers
|
||||||
[ExcludeFromCodeCoverage]
|
[ExcludeFromCodeCoverage]
|
||||||
public class FileList : BaseWebIndexer
|
public class FileList : BaseWebIndexer
|
||||||
{
|
{
|
||||||
|
public override string[] AlternativeSiteLinks { get; protected set; } = {
|
||||||
|
"https://flro.org/"
|
||||||
|
};
|
||||||
|
|
||||||
public override string[] LegacySiteLinks { get; protected set; } =
|
public override string[] LegacySiteLinks { get; protected set; } =
|
||||||
{
|
{
|
||||||
"http://filelist.ro/",
|
|
||||||
"https://filelist.ro/",
|
"https://filelist.ro/",
|
||||||
"https://flro.org/",
|
"http://filelist.ro/",
|
||||||
"http://flro.org/"
|
"http://flro.org/"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -132,11 +135,17 @@ namespace Jackett.Common.Indexers
|
||||||
|
|
||||||
foreach (var row in json)
|
foreach (var row in json)
|
||||||
{
|
{
|
||||||
|
var isFreeleech = row.Value<bool>("freeleech");
|
||||||
|
|
||||||
|
// skip non-freeleech results when freeleech only is set
|
||||||
|
if (configData.Freeleech.Value && !isFreeleech)
|
||||||
|
continue;
|
||||||
|
|
||||||
var detailsUri = new Uri(DetailsUrl + "?id=" + row.Value<string>("id"));
|
var detailsUri = new Uri(DetailsUrl + "?id=" + row.Value<string>("id"));
|
||||||
var seeders = row.Value<int>("seeders");
|
var seeders = row.Value<int>("seeders");
|
||||||
var peers = seeders + row.Value<int>("leechers");
|
var peers = seeders + row.Value<int>("leechers");
|
||||||
var publishDate = DateTime.Parse(row.Value<string>("upload_date") + " +0200", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);
|
var publishDate = DateTime.Parse(row.Value<string>("upload_date") + " +0200", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);
|
||||||
var downloadVolumeFactor = row.Value<bool>("freeleech") ? 0 : 1;
|
var downloadVolumeFactor = isFreeleech ? 0 : 1;
|
||||||
var uploadVolumeFactor = row.Value<bool>("doubleup") ? 2 : 1;
|
var uploadVolumeFactor = row.Value<bool>("doubleup") ? 2 : 1;
|
||||||
var imdbId = ((JObject)row).ContainsKey("imdb") ? ParseUtil.GetImdbID(row.Value<string>("imdb")) : null;
|
var imdbId = ((JObject)row).ContainsKey("imdb") ? ParseUtil.GetImdbID(row.Value<string>("imdb")) : null;
|
||||||
var link = new Uri(row.Value<string>("download_link"));
|
var link = new Uri(row.Value<string>("download_link"));
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
|
||||||
public ConfigurationDataFileList()
|
public ConfigurationDataFileList()
|
||||||
: base("Note this is <b>not</b> your <i>password</i>.<ul><li>Login to the FileList Website</li><li>Click on the <b>Profile</b> link</li><li>Scroll down to the <b>Reset Passkey</b> section</li><li>Copy the <b>passkey</b>.</li><li>Also be aware of not leaving a trailing blank at the end of the passkey after pasting it here.</li></ul>")
|
: base("Note this is <b>not</b> your <i>password</i>.<ul><li>Login to the FileList Website</li><li>Click on the <b>Profile</b> link</li><li>Scroll down to the <b>Reset Passkey</b> section</li><li>Copy the <b>passkey</b>.</li><li>Also be aware of not leaving a trailing blank at the end of the passkey after pasting it here.</li></ul>")
|
||||||
{
|
{
|
||||||
Freeleech = new BoolConfigurationItem("Search freeleech only (currently works only when searching)") { Value = false };
|
Freeleech = new BoolConfigurationItem("Search freeleech only") { Value = false };
|
||||||
CatWarning = new DisplayInfoConfigurationItem("CatWarning", "When mapping TV ensure you add category 5000 in addition to 5030, 5040.");
|
CatWarning = new DisplayInfoConfigurationItem("CatWarning", "When mapping TV ensure you add category 5000 in addition to 5030, 5040.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue