1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-21 23:32:27 +00:00

Fixed: Updated Base Url for Redacted (#5250)

This commit is contained in:
d-rez 2024-11-28 09:14:39 +11:00 committed by GitHub
parent 2b1684a793
commit beabad5e3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 19 additions and 5 deletions

View file

@ -47,8 +47,8 @@ public async Task should_parse_recent_feed_from_redacted()
releaseInfo.Title.Should().Be("Shania Twain - Shania Twain (1993) [Album] [FLAC 24bit Lossless / WEB]"); releaseInfo.Title.Should().Be("Shania Twain - Shania Twain (1993) [Album] [FLAC 24bit Lossless / WEB]");
releaseInfo.DownloadProtocol.Should().Be(DownloadProtocol.Torrent); releaseInfo.DownloadProtocol.Should().Be(DownloadProtocol.Torrent);
releaseInfo.DownloadUrl.Should().Be("https://redacted.ch/ajax.php?action=download&id=1541452"); releaseInfo.DownloadUrl.Should().Be("https://redacted.sh/ajax.php?action=download&id=1541452");
releaseInfo.InfoUrl.Should().Be("https://redacted.ch/torrents.php?id=106951&torrentid=1541452"); releaseInfo.InfoUrl.Should().Be("https://redacted.sh/torrents.php?id=106951&torrentid=1541452");
releaseInfo.CommentUrl.Should().Be(null); releaseInfo.CommentUrl.Should().Be(null);
releaseInfo.Indexer.Should().Be(Subject.Definition.Name); releaseInfo.Indexer.Should().Be(Subject.Definition.Name);
releaseInfo.PublishDate.Should().Be(DateTime.Parse("2017-12-11 00:17:53")); releaseInfo.PublishDate.Should().Be(DateTime.Parse("2017-12-11 00:17:53"));

View file

@ -0,0 +1,14 @@
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(080)]
public class update_redacted_baseurl : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Execute.Sql("UPDATE \"Indexers\" SET \"Settings\" = Replace(\"Settings\", '//redacted.ch', '//redacted.sh') WHERE \"Implementation\" = 'Redacted'");
}
}
}

View file

@ -26,7 +26,7 @@ public override HealthCheck Check()
{ {
var definition = (IndexerDefinition)indexer.Definition; var definition = (IndexerDefinition)indexer.Definition;
if (definition.Settings is GazelleSettings { BaseUrl: "https://redacted.ch" }) if (definition.Settings is GazelleSettings { BaseUrl: "https://redacted.sh" or "https://redacted.ch" })
{ {
return new HealthCheck(GetType(), HealthCheckResult.Warning, "You have set up Redacted as a Gazelle indexer, please reconfigure using the Redacted indexer setting"); return new HealthCheck(GetType(), HealthCheckResult.Warning, "You have set up Redacted as a Gazelle indexer, please reconfigure using the Redacted indexer setting");
} }

View file

@ -11,7 +11,7 @@ namespace NzbDrone.Core.Indexers.Redacted
{ {
public class Redacted : HttpIndexerBase<RedactedSettings> public class Redacted : HttpIndexerBase<RedactedSettings>
{ {
public override string Name => "Redacted.ch"; public override string Name => "Redacted";
public override DownloadProtocol Protocol => DownloadProtocol.Torrent; public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
public override bool SupportsRss => true; public override bool SupportsRss => true;
public override bool SupportsSearch => true; public override bool SupportsSearch => true;

View file

@ -19,7 +19,7 @@ public class RedactedSettings : ITorrentIndexerSettings
public RedactedSettings() public RedactedSettings()
{ {
BaseUrl = "https://redacted.ch"; BaseUrl = "https://redacted.sh";
Categories = new[] Categories = new[]
{ {
(int)RedactedCategory.Music (int)RedactedCategory.Music