From bc94a7f92133799da0934aefeaa31a7676aaab87 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Thu, 21 Jul 2016 23:29:13 +0200 Subject: [PATCH] Fixed: Forcibly disable kat when using the wrong domain. --- .../Datastore/Migration/096_disable_kickass.cs | 16 ++++++++++++++++ .../KickassTorrents/KickassTorrentsSettings.cs | 4 ++-- src/NzbDrone.Core/NzbDrone.Core.csproj | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/096_disable_kickass.cs diff --git a/src/NzbDrone.Core/Datastore/Migration/096_disable_kickass.cs b/src/NzbDrone.Core/Datastore/Migration/096_disable_kickass.cs new file mode 100644 index 000000000..36a88b70d --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/096_disable_kickass.cs @@ -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%';"); + } + } +} diff --git a/src/NzbDrone.Core/Indexers/KickassTorrents/KickassTorrentsSettings.cs b/src/NzbDrone.Core/Indexers/KickassTorrents/KickassTorrentsSettings.cs index fe8c49625..3ef327b47 100644 --- a/src/NzbDrone.Core/Indexers/KickassTorrents/KickassTorrentsSettings.cs +++ b/src/NzbDrone.Core/Indexers/KickassTorrents/KickassTorrentsSettings.cs @@ -20,11 +20,11 @@ public class KickassTorrentsSettings : IProviderConfig public KickassTorrentsSettings() { - BaseUrl = "https://kat.cr"; + BaseUrl = ""; 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; } [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.")] diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 1cb0a1ab7..8167afd3e 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -252,6 +252,7 @@ +