From f481676c81829ed49322b5101b5df1ed9d34f1e7 Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sun, 22 Jan 2017 14:55:25 +0100 Subject: [PATCH] Fix migration to include ConfigContract and EnableAuto. Also fixed redirects on lists. Please delete NetImport Table and the corresponding VersionInfo Row (123) --- .../Datastore/Migration/123_create_netimport_table.cs | 4 +++- src/NzbDrone.Core/Datastore/TableMapping.cs | 3 +-- src/NzbDrone.Core/Indexers/HttpIndexerBase.cs | 2 ++ src/NzbDrone.Core/NetImport/HttpNetImportBase.cs | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/123_create_netimport_table.cs b/src/NzbDrone.Core/Datastore/Migration/123_create_netimport_table.cs index 1e52f97d7..619be4381 100644 --- a/src/NzbDrone.Core/Datastore/Migration/123_create_netimport_table.cs +++ b/src/NzbDrone.Core/Datastore/Migration/123_create_netimport_table.cs @@ -14,7 +14,9 @@ namespace NzbDrone.Core.Datastore.Migration .WithColumn("Enabled").AsBoolean() .WithColumn("Name").AsString().Unique() .WithColumn("Implementation").AsString() - .WithColumn("Settings").AsString().Nullable(); + .WithColumn("ConfigContract").AsString().Nullable() + .WithColumn("Settings").AsString().Nullable() + .WithColumn("EnableAuto").AsInt32(); } } } diff --git a/src/NzbDrone.Core/Datastore/TableMapping.cs b/src/NzbDrone.Core/Datastore/TableMapping.cs index 86a2116dd..64e068fc0 100644 --- a/src/NzbDrone.Core/Datastore/TableMapping.cs +++ b/src/NzbDrone.Core/Datastore/TableMapping.cs @@ -57,8 +57,7 @@ namespace NzbDrone.Core.Datastore .Ignore(i => i.SupportsSearch); Mapper.Entity().RegisterDefinition("NetImport") - .Ignore(i => i.Enable) - .Ignore(i => i.ConfigContract); + .Ignore(i => i.Enable); Mapper.Entity().RegisterDefinition("Notifications") .Ignore(i => i.SupportsOnGrab) diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index c912291fa..a29e9a9b8 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -306,6 +306,8 @@ namespace NzbDrone.Core.Indexers request.HttpRequest.RateLimit = RateLimit; } + request.HttpRequest.AllowAutoRedirect = true; + return new IndexerResponse(request, _httpClient.Execute(request.HttpRequest)); } diff --git a/src/NzbDrone.Core/NetImport/HttpNetImportBase.cs b/src/NzbDrone.Core/NetImport/HttpNetImportBase.cs index b0596c985..f2aef309c 100644 --- a/src/NzbDrone.Core/NetImport/HttpNetImportBase.cs +++ b/src/NzbDrone.Core/NetImport/HttpNetImportBase.cs @@ -226,6 +226,8 @@ namespace NzbDrone.Core.NetImport request.HttpRequest.RateLimit = RateLimit; } + request.HttpRequest.AllowAutoRedirect = true; + return new NetImportResponse(request, _httpClient.Execute(request.HttpRequest)); }