assorted bespoke C#: move or add activity info to config (#15122)

This commit is contained in:
ilike2burnthing 2024-03-05 21:40:14 +00:00 committed by GitHub
parent c5ad4e5118
commit 54e3c32c1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 19 additions and 14 deletions

View File

@ -16,7 +16,6 @@ using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
using Newtonsoft.Json.Linq;
using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
namespace Jackett.Common.Indexers
{
@ -49,7 +48,6 @@ namespace Jackett.Common.Indexers
cacheService: cs,
configData: new ConfigurationDataAnimeTorrents())
{
configData.AddDynamic("Account Inactivity", new DisplayInfoConfigurationItem("Account Inactivity", "You must login and download at least 1 torrent per year or your account will be deleted. There is no re-activation. AnimeTorrents do not send email reminders, it is your responsibility."));
}
private TorznabCapabilities SetCapabilities()

View File

@ -6,7 +6,6 @@ using Jackett.Common.Models;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils.Clients;
using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
namespace Jackett.Common.Indexers
{
@ -30,7 +29,6 @@ namespace Jackett.Common.Indexers
p: ps,
cs: cs)
{
configData.AddDynamic("Account Inactivity", new DisplayInfoConfigurationItem("Account Inactivity", "To avoid account deletion you must login at least 1 time every 90 days, and you must download at least 1 torrent every 6 months. Simply keeping torrents seeding long term will not protect your account. Do not rely on inactivity emails, we often do not send them."));
}
private TorznabCapabilities SetCapabilities()

View File

@ -5,7 +5,6 @@ using Jackett.Common.Models;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils.Clients;
using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
namespace Jackett.Common.Indexers
{
@ -28,7 +27,6 @@ namespace Jackett.Common.Indexers
cs: cs
)
{
configData.AddDynamic("Account Inactivity", new DisplayInfoConfigurationItem("Account Inactivity", "To avoid account deletion you must login at least 1 time every 90 days, and you must download at least 1 torrent every 6 months. Simply keeping torrents seeding long term will not protect your account. Do not rely on inactivity emails, CinemaZ often do not send them."));
}
private TorznabCapabilities SetCapabilities()

View File

@ -13,7 +13,6 @@ using Jackett.Common.Utils.Clients;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
namespace Jackett.Common.Indexers
{
@ -45,7 +44,6 @@ namespace Jackett.Common.Indexers
configData: new ConfigurationDataMyAnonamouse())
{
webclient.EmulateBrowser = false;
configData.AddDynamic("Account Inactivity", new DisplayInfoConfigurationItem("Account Inactivity", "To prevent your account from being disabled for inactivity, you must log in on a regular basis. You must also use your account - if you do not, your account will be disabled. If you know that you will not be able to login for an extended period of time, you can park your account in your preferences and it will not be disabled."));
}
private TorznabCapabilities SetCapabilities()

View File

@ -18,7 +18,6 @@ using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
using Newtonsoft.Json.Linq;
using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
namespace Jackett.Common.Indexers
{
@ -50,8 +49,6 @@ namespace Jackett.Common.Indexers
cacheService: cs,
configData: new ConfigurationDataNorbits())
{
configData.AddDynamic("freeleech", new BoolConfigurationItem("Search freeleech only") { Value = false });
configData.AddDynamic("Account Inactivity", new DisplayInfoConfigurationItem("Account Inactivity", "Parasites are deactivated after 28 days. (7 days below 0.3 in ratio, 7 days with a warning, 14 days as a parasite). Accounts with nothing downloaded or uploaded will be deactivated after 28 days. This only applies to newly registered accounts without torrent activity (e.g. not passing the norbits test)."));
}
private TorznabCapabilities SetCapabilities()
@ -388,7 +385,7 @@ namespace Jackett.Common.Indexers
term = "all";
}
if (((BoolConfigurationItem)configData.GetDynamic("freeleech")).Value)
if (ConfigData.freeleech.Value)
{
parameters.Add("FL", "1");
}

View File

@ -14,7 +14,6 @@ using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
using Newtonsoft.Json.Linq;
using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
namespace Jackett.Common.Indexers
{
@ -56,7 +55,6 @@ namespace Jackett.Common.Indexers
in your Speed.Cd profile. Eg. Geo Locking, your seedbox may be in a different country to the one where you login via your
web browser.<br><br>For best results, change the 'Torrents per page' setting to 100 in 'Profile Settings > Torrents'."))
{
configData.AddDynamic("Account Inactivity", new DisplayInfoConfigurationItem("Account Inactivity", "Accounts not being used for 3 months will be removed to make room for active members."));
}
private TorznabCapabilities SetCapabilities()

View File

@ -7,11 +7,13 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
{
public BoolConfigurationItem FreeleechOnly { get; private set; }
public BoolConfigurationItem DownloadableOnly { get; private set; }
public DisplayInfoConfigurationItem AccountActivity { get; private set; }
public ConfigurationDataAnimeTorrents()
{
FreeleechOnly = new BoolConfigurationItem("Show freeleech only") { Value = false };
DownloadableOnly = new BoolConfigurationItem("Search downloadable torrents only (enable this only if your account class is Newbie)") { Value = false };
AccountActivity = new DisplayInfoConfigurationItem("Account Inactivity", "You must login and download at least 1 torrent per year or your account will be deleted. There is no re-activation. AnimeTorrents do not send email reminders, it is your responsibility.");
}
}
}

View File

@ -6,11 +6,13 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
internal class ConfigurationDataAvistazTracker : ConfigurationDataBasicLoginWithPID
{
public BoolConfigurationItem Freeleech { get; private set; }
public DisplayInfoConfigurationItem AccountActivity { get; private set; }
public ConfigurationDataAvistazTracker()
: base("You have to check 'Enable RSS Feed' in 'My Account', without this configuration the torrent download does not work.<br/>You can find the PID in 'My profile'.")
{
Freeleech = new BoolConfigurationItem("Search freeleech only") { Value = false };
AccountActivity = new DisplayInfoConfigurationItem("Account Inactivity", "To avoid account deletion you must login at least 1 time every 90 days, and you must download at least 1 torrent every 6 months. Simply keeping torrents seeding long term will not protect your account. Do not rely on inactivity emails, admins often do not send them.");
}
}
}

View File

@ -12,6 +12,7 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
public BoolConfigurationItem SearchInDescription { get; private set; }
public BoolConfigurationItem SearchInSeries { get; private set; }
public BoolConfigurationItem SearchInFilenames { get; private set; }
public DisplayInfoConfigurationItem AccountActivity { get; private set; }
public ConfigurationDataMyAnonamouse()
{
@ -32,6 +33,7 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
SearchInDescription = new BoolConfigurationItem("Also search text in the description") { Value = false };
SearchInSeries = new BoolConfigurationItem("Also search text in the series") { Value = false };
SearchInFilenames = new BoolConfigurationItem("Also search text in the filenames") { Value = false };
AccountActivity = new DisplayInfoConfigurationItem("Account Inactivity", "To prevent your account from being disabled for inactivity, you must log in on a regular basis. You must also use your account - if you do not, your account will be disabled. If you know that you will not be able to login for an extended period of time, you can park your account in your preferences and it will not be disabled.");
}
}
}

View File

@ -9,9 +9,11 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
public StringConfigurationItem Username { get; private set; }
public PasswordConfigurationItem Password { get; private set; }
public StringConfigurationItem TwoFactorAuth { get; private set; }
public BoolConfigurationItem freeleech { get; private set; }
public DisplayInfoConfigurationItem PagesWarning { get; private set; }
public StringConfigurationItem Pages { get; private set; }
public BoolConfigurationItem UseFullSearch { get; private set; }
public DisplayInfoConfigurationItem AccountActivity { get; private set; }
public ConfigurationDataNorbits()
{
@ -19,9 +21,11 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
Username = new StringConfigurationItem("Username") { Value = "" };
Password = new PasswordConfigurationItem("Password") { Value = "" };
TwoFactorAuth = new StringConfigurationItem("2FA Code (Optional)");
freeleech = new BoolConfigurationItem("Search freeleech only") { Value = false };
PagesWarning = new DisplayInfoConfigurationItem("Preferences", "<b>Preferences Configuration</b> (<i>Tweak your search settings</i>),<br /><br /> <ul><li><b>Max Pages to Process</b> let you specify how many page (max) Jackett can process when doing a search. Setting a value <b>higher than 4 is dangerous</b> for you account ! (<b>Result of too many requests to tracker...that <u>will be suspect</u></b>).</li></ul>");
Pages = new StringConfigurationItem("Max Pages to Process (Required)") { Value = "4" };
UseFullSearch = new BoolConfigurationItem("Enable search in description.") { Value = false };
AccountActivity = new DisplayInfoConfigurationItem("Account Inactivity", "Parasites are deactivated after 28 days. (7 days below 0.3 in ratio, 7 days with a warning, 14 days as a parasite). Accounts with nothing downloaded or uploaded will be deactivated after 28 days. This only applies to newly registered accounts without torrent activity (e.g. not passing the norbits test).");
}
}
}

View File

@ -6,11 +6,13 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
internal class ConfigurationDataSceneTime : ConfigurationDataCookieUA
{
public BoolConfigurationItem Freeleech { get; private set; }
public DisplayInfoConfigurationItem AccountActivity { get; private set; }
public ConfigurationDataSceneTime()
: base("For best results, change the 'Torrents per page' setting to the maximum in your profile on the SceneTime webpage.")
{
Freeleech = new BoolConfigurationItem("Freeleech Only (Optional)") { Value = false };
AccountActivity = new DisplayInfoConfigurationItem("Account Inactivity", "Unused accounts (accounts with no activity) may be deleted.");
}
}
}

View File

@ -6,10 +6,12 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
internal class ConfigurationDataSpeedAppTracker : ConfigurationDataBasicLoginWithEmail
{
public BoolConfigurationItem FreeleechOnly { get; private set; }
public DisplayInfoConfigurationItem AccountActivity { get; private set; }
public ConfigurationDataSpeedAppTracker()
{
FreeleechOnly = new BoolConfigurationItem("Show freeleech only") { Value = false };
AccountActivity = new DisplayInfoConfigurationItem("Account Inactivity", "The accounts shall not be deleted or automatically deactivated. Inactive accounts, regardless of class, will have the invitations deleted after 180 days.");
}
}
}

View File

@ -7,12 +7,14 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
{
public BoolConfigurationItem Freeleech { get; set; }
public BoolConfigurationItem ExcludeArchives { get; set; }
public DisplayInfoConfigurationItem AccountActivity { get; private set; }
public ConfigurationDataSpeedCD(string instructionMessageOptional = null)
: base(instructionMessageOptional)
{
Freeleech = new BoolConfigurationItem("Search freeleech only") { Value = false };
ExcludeArchives = new BoolConfigurationItem("Exclude torrents with RAR files") { Value = false };
AccountActivity = new DisplayInfoConfigurationItem("Account Inactivity", "Accounts not being used for 3 months will be removed to make room for active members.");
}
}
}

View File

@ -9,11 +9,13 @@ namespace Jackett.Common.Models.IndexerConfig.Bespoke
{
public StringConfigurationItem Username { get; private set; }
public StringConfigurationItem Password { get; private set; }
public DisplayInfoConfigurationItem AccountActivity { get; private set; }
public ConfigurationDataTVstore()
{
Username = new StringConfigurationItem("Username") { Value = "" };
Password = new StringConfigurationItem("Password") { Value = "" };
AccountActivity = new DisplayInfoConfigurationItem("Account Inactivity", "If a user does not log in to the site for 100 days (Tag, Storekeeper for 1 year), it is automatically deleted.");
}
public ConfigurationDataTVstore(JToken json)