Fixed: Forcibly disable kat when using the wrong domain.

This commit is contained in:
Taloth Saldono 2016-07-21 23:29:13 +02:00
parent f3cbc2bdd2
commit bc94a7f921
3 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1,16 @@
using System.Data;
using FluentMigrator;
using NzbDrone.Common.Serializer;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(96)]
public class disable_kickass : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Execute.Sql("UPDATE Indexers SET EnableRss = 0, EnableSearch = 0, Settings = Replace(Settings, 'https://kat.cr', '') WHERE Implementation = 'KickassTorrents' AND Settings LIKE '%kat.cr%';");
}
}
}

View File

@ -20,11 +20,11 @@ namespace NzbDrone.Core.Indexers.KickassTorrents
public KickassTorrentsSettings() public KickassTorrentsSettings()
{ {
BaseUrl = "https://kat.cr"; BaseUrl = "";
VerifiedOnly = true; VerifiedOnly = true;
} }
[FieldDefinition(0, Label = "Website URL")] [FieldDefinition(0, Label = "Website URL", HelpText = "Please verify that the url you enter is a trustworthy site.")]
public string BaseUrl { get; set; } public string BaseUrl { get; set; }
[FieldDefinition(1, Label = "Verified Only", Type = FieldType.Checkbox, HelpText = "By setting this to No you will likely get more junk and unconfirmed releases, so use it with caution.")] [FieldDefinition(1, Label = "Verified Only", Type = FieldType.Checkbox, HelpText = "By setting this to No you will likely get more junk and unconfirmed releases, so use it with caution.")]

View File

@ -252,6 +252,7 @@
<Compile Include="Datastore\Migration\068_add_release_restrictions.cs" /> <Compile Include="Datastore\Migration\068_add_release_restrictions.cs" />
<Compile Include="Datastore\Migration\069_quality_proper.cs" /> <Compile Include="Datastore\Migration\069_quality_proper.cs" />
<Compile Include="Datastore\Migration\070_delay_profile.cs" /> <Compile Include="Datastore\Migration\070_delay_profile.cs" />
<Compile Include="Datastore\Migration\096_disable_kickass.cs" />
<Compile Include="Datastore\Migration\101_add_ultrahd_quality_in_profiles.cs" /> <Compile Include="Datastore\Migration\101_add_ultrahd_quality_in_profiles.cs" />
<Compile Include="Datastore\Migration\071_unknown_quality_in_profile.cs" /> <Compile Include="Datastore\Migration\071_unknown_quality_in_profile.cs" />
<Compile Include="Datastore\Migration\072_history_grabid.cs" /> <Compile Include="Datastore\Migration\072_history_grabid.cs" />