From 620359dcc6ec0f4bc4ab10f9c1871d2f254b6884 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Thu, 14 Jan 2021 23:30:47 +0100 Subject: [PATCH] Fixed: Updated BTN url to https closes #4249 --- .../Migration/152_update_btn_url_to_https.cs | 15 +++++++++++++++ .../BroadcastheNet/BroadcastheNetSettings.cs | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/152_update_btn_url_to_https.cs diff --git a/src/NzbDrone.Core/Datastore/Migration/152_update_btn_url_to_https.cs b/src/NzbDrone.Core/Datastore/Migration/152_update_btn_url_to_https.cs new file mode 100644 index 000000000..74d12b828 --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/152_update_btn_url_to_https.cs @@ -0,0 +1,15 @@ +using FluentMigrator; +using Newtonsoft.Json.Linq; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(152)] + public class update_btn_url_to_https : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Execute.Sql("UPDATE Indexers SET Settings = Replace(Settings, 'http://api.broadcasthe.net', 'https://api.broadcasthe.net') WHERE Implementation = 'BroadcastheNet';"); + } + } +} diff --git a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetSettings.cs b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetSettings.cs index a37e8c1b8..5dca18c01 100644 --- a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetSettings.cs +++ b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetSettings.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet public BroadcastheNetSettings() { - BaseUrl = "http://api.broadcasthe.net/"; + BaseUrl = "https://api.broadcasthe.net/"; MinimumSeeders = IndexerDefaults.MINIMUM_SEEDERS; }