mirror of https://github.com/lidarr/Lidarr
Fixed: UnsupportedFeedException should log error for each item (#77)
This commit is contained in:
parent
52a4227bc4
commit
b0cde61dd0
|
@ -5,9 +5,11 @@ using Moq;
|
|||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using NzbDrone.Core.Indexers.Exceptions;
|
||||
using NzbDrone.Core.Indexers.TorrentRss;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests
|
||||
{
|
||||
|
@ -258,5 +260,18 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests
|
|||
torrentInfo.DownloadProtocol.Should().Be(DownloadProtocol.Torrent);
|
||||
torrentInfo.DownloadUrl.Should().Be("https://alpharatio.cc/torrents.php?action=download&authkey=private_auth_key&torrent_pass=private_torrent_pass&id=465831");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_record_indexer_failure_if_unsupported_feed()
|
||||
{
|
||||
GivenRecentFeedResponse("TorrentRss/invalid/TorrentDay_NoPubDate.xml");
|
||||
|
||||
Subject.FetchRecent().Should().BeEmpty();
|
||||
|
||||
Mocker.GetMock<IIndexerStatusService>()
|
||||
.Verify(v => v.RecordFailure(It.IsAny<int>(), TimeSpan.Zero), Times.Once());
|
||||
|
||||
ExceptionVerification.ExpectedErrors(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,11 @@ namespace NzbDrone.Core.Indexers
|
|||
|
||||
releases.AddIfNotNull(reportInfo);
|
||||
}
|
||||
catch (UnsupportedFeedException itemEx)
|
||||
{
|
||||
itemEx.Data.Add("Item", item.Title());
|
||||
throw;
|
||||
}
|
||||
catch (Exception itemEx)
|
||||
{
|
||||
itemEx.Data.Add("Item", item.Title());
|
||||
|
|
Loading…
Reference in New Issue