You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/src/NzbDrone.Core/Datastore/Migration/090_update_kickass_url.cs

36 lines
1.2 KiB

using FluentMigrator;
using Newtonsoft.Json.Linq;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(90)]
public class update_kickass_url : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Execute.Sql(
"UPDATE Indexers SET Settings = Replace(Settings, 'kickass.so', 'kat.cr') WHERE Implementation = 'KickassTorrents';" +
"UPDATE Indexers SET Settings = Replace(Settings, 'kickass.to', 'kat.cr') WHERE Implementation = 'KickassTorrents';" +
"UPDATE Indexers SET Settings = Replace(Settings, 'http://', 'https://') WHERE Implementation = 'KickassTorrents';");
}
}
public class IndexerDefinition90
{
public int Id { get; set; }
public string Name { get; set; }
public JObject Settings { get; set; }
public string Implementation { get; set; }
public string ConfigContract { get; set; }
public bool EnableRss { get; set; }
public bool EnableSearch { get; set; }
}
public class KickassTorrentsSettings90
{
public string BaseUrl { get; set; }
public bool VerifiedOnly { get; set; }
}
}