mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-12-29 09:05:28 +01:00
Fixed bug with RSS Item TIitle.
Fixed broken tests.
This commit is contained in:
@@ -147,6 +147,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests
|
||||
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(5)
|
||||
.All()
|
||||
.With(e => e.AirDate = DateTime.Today)
|
||||
.With(e => e.Quality = new Quality(QualityTypes.HDTV, false))
|
||||
.Build();
|
||||
|
||||
WithNullSeries();
|
||||
@@ -167,6 +168,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests
|
||||
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(5)
|
||||
.All()
|
||||
.With(e => e.AirDate = DateTime.Today)
|
||||
.With(e => e.Quality = new Quality(QualityTypes.HDTV, false))
|
||||
.Build();
|
||||
|
||||
WithMisMatchedSeries();
|
||||
@@ -242,6 +244,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests
|
||||
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(5)
|
||||
.All()
|
||||
.With(e => e.AirDate = null)
|
||||
.With(e => e.Quality = new Quality(QualityTypes.HDTV, false))
|
||||
.Build();
|
||||
|
||||
WithMatchingSeries();
|
||||
@@ -262,6 +265,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests
|
||||
var parseResults = Builder<EpisodeParseResult>.CreateListOfSize(5)
|
||||
.All()
|
||||
.With(e => e.AirDate = DateTime.Today.AddDays(10))
|
||||
.With(e => e.Quality = new Quality(QualityTypes.HDTV, false))
|
||||
.Build();
|
||||
|
||||
WithMatchingSeries();
|
||||
|
||||
@@ -183,6 +183,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests
|
||||
.All()
|
||||
.With(e => e.SeasonNumber = 1)
|
||||
.With(e => e.EpisodeNumbers = new List<int> { 1 })
|
||||
.With(e => e.Quality = new Quality(QualityTypes.HDTV, false))
|
||||
.Build();
|
||||
|
||||
WithNullSeries();
|
||||
@@ -205,6 +206,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests
|
||||
.All()
|
||||
.With(e => e.SeasonNumber = 1)
|
||||
.With(e => e.EpisodeNumbers = new List<int> { 1 })
|
||||
.With(e => e.Quality = new Quality(QualityTypes.HDTV, false))
|
||||
.Build();
|
||||
|
||||
WithMisMatchedSeries();
|
||||
@@ -227,6 +229,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests
|
||||
.All()
|
||||
.With(e => e.SeasonNumber = 2)
|
||||
.With(e => e.EpisodeNumbers = new List<int> { 1 })
|
||||
.With(e => e.Quality = new Quality(QualityTypes.HDTV, false))
|
||||
.Build();
|
||||
|
||||
WithMatchingSeries();
|
||||
@@ -249,6 +252,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchProviderTests
|
||||
.All()
|
||||
.With(e => e.SeasonNumber = 1)
|
||||
.With(e => e.EpisodeNumbers = new List<int> { 2 })
|
||||
.With(e => e.Quality = new Quality(QualityTypes.HDTV, false))
|
||||
.Build();
|
||||
|
||||
WithMatchingSeries();
|
||||
|
||||
@@ -236,8 +236,11 @@ namespace NzbDrone.Core.Providers.Indexer
|
||||
var title = TitlePreParser(item);
|
||||
|
||||
var episodeParseResult = Parser.ParseTitle(title);
|
||||
episodeParseResult.OriginalString = title;
|
||||
if (episodeParseResult != null) episodeParseResult.Age = DateTime.Now.Date.Subtract(item.PublishDate.Date).Days;
|
||||
if (episodeParseResult != null)
|
||||
{
|
||||
episodeParseResult.Age = DateTime.Now.Date.Subtract(item.PublishDate.Date).Days;
|
||||
episodeParseResult.OriginalString = title;
|
||||
}
|
||||
|
||||
_logger.Trace("Parsed: {0} from: {1}", episodeParseResult, item.Title.Text);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user