From 87f591dfbd271f4805cf99d9d0defda21465bb24 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 16 Mar 2014 22:32:39 -0700 Subject: [PATCH] Fixed: nzb.su URL changed to api.nzb.su --- .../Download/FailedDownloadServiceFixture.cs | 17 +++++++++++++++++ .../Datastore/Migration/046_fix_nzb_su_url.cs | 16 ++++++++++++++++ src/NzbDrone.Core/NzbDrone.Core.csproj | 1 + 3 files changed, 34 insertions(+) create mode 100644 src/NzbDrone.Core/Datastore/Migration/046_fix_nzb_su_url.cs diff --git a/src/NzbDrone.Core.Test/Download/FailedDownloadServiceFixture.cs b/src/NzbDrone.Core.Test/Download/FailedDownloadServiceFixture.cs index bb91060ae..fc8bf395f 100644 --- a/src/NzbDrone.Core.Test/Download/FailedDownloadServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Download/FailedDownloadServiceFixture.cs @@ -253,5 +253,22 @@ namespace NzbDrone.Core.Test.Download VerifyNoFailedDownloads(); } + + [Test] + public void should_not_process_if_failed_due_to_lack_of_disk_space() + { + var history = Builder.CreateListOfSize(1) + .Build() + .ToList(); + + GivenGrabbedHistory(history); + GivenFailedDownloadClientHistory(); + + _failed.First().Message = "Unpacking failed, write error or disk is full?"; + + Subject.Execute(new CheckForFailedDownloadCommand()); + + VerifyNoFailedDownloads(); + } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/046_fix_nzb_su_url.cs b/src/NzbDrone.Core/Datastore/Migration/046_fix_nzb_su_url.cs new file mode 100644 index 000000000..6d5496c0a --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/046_fix_nzb_su_url.cs @@ -0,0 +1,16 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(46)] + public class fix_nzb_su_url : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Execute.Sql("UPDATE Indexers SET Settings = replace(Settings, '//nzb.su', '//api.nzb.su')" + + "WHERE Implementation = 'Newznab'" + + "AND Settings LIKE '%//nzb.su%'"); + } + } +} diff --git a/src/NzbDrone.Core/NzbDrone.Core.csproj b/src/NzbDrone.Core/NzbDrone.Core.csproj index 941d40815..5f619fad6 100644 --- a/src/NzbDrone.Core/NzbDrone.Core.csproj +++ b/src/NzbDrone.Core/NzbDrone.Core.csproj @@ -191,6 +191,7 @@ Code +