Merge branch 'markus101'

pull/3113/head
kay.one 14 years ago
commit fe5e899604

@ -117,7 +117,6 @@ namespace NzbDrone.Core.Test
Assert.AreEqual(quality, result.Quality.QualityType);
}
[Test]
[TestCase("Adventure.Inc.DVDRip.XviD-OSiTV")]
public void custome_parser_full_parse(string title)
@ -143,8 +142,6 @@ namespace NzbDrone.Core.Test
ExceptionVerification.ExcpectedWarns(1);
}
[Test]
public void downloadFeed()
{
@ -161,7 +158,6 @@ namespace NzbDrone.Core.Test
ExceptionVerification.IgnoreWarns();
}
[Test]
public void nzbsorg_search_returns_valid_results()
{
@ -175,7 +171,6 @@ namespace NzbDrone.Core.Test
.SetupGet(c => c.NzbsOrgHash)
.Returns("bc8edb4cc49d4ae440775adec5ac001f");
mocker.Resolve<HttpProvider>();
var result = mocker.Resolve<NzbsOrg>().FetchEpisode("Simpsons", 21, 23);
@ -186,7 +181,6 @@ namespace NzbDrone.Core.Test
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(23));
}
[Test]
public void newzbin_search_returns_valid_results()
{
@ -200,7 +194,6 @@ namespace NzbDrone.Core.Test
.SetupGet(c => c.NewzbinPassword)
.Returns("smartar39865");
mocker.Resolve<HttpProvider>();
var result = mocker.Resolve<Newzbin>().FetchEpisode("Simpsons", 21, 23);
@ -211,6 +204,28 @@ namespace NzbDrone.Core.Test
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(23));
}
[Test]
public void nzbmatrix_search_returns_valid_results()
{
var mocker = new AutoMoqer();
mocker.GetMock<ConfigProvider>()
.SetupGet(c => c.NzbMatrixUsername)
.Returns("");
mocker.GetMock<ConfigProvider>()
.SetupGet(c => c.NzbMatrixApiKey)
.Returns("");
mocker.Resolve<HttpProvider>();
var result = mocker.Resolve<NzbMatrix>().FetchEpisode("Simpsons", 21, 23);
result.Should().NotBeEmpty();
result.Should().OnlyContain(r => r.CleanTitle == "simpsons");
result.Should().OnlyContain(r => r.SeasonNumber == 21);
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(23));
}
[Test]
public void nzbsorg_multi_word_search_returns_valid_results()
@ -225,7 +240,6 @@ namespace NzbDrone.Core.Test
.SetupGet(c => c.NzbsOrgHash)
.Returns("bc8edb4cc49d4ae440775adec5ac001f");
mocker.Resolve<HttpProvider>();
var result = mocker.Resolve<NzbsOrg>().FetchEpisode("Blue Bloods", 1, 19);
@ -236,5 +250,28 @@ namespace NzbDrone.Core.Test
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(19));
}
[Test]
public void nzbmatrix_multi_word_search_returns_valid_results()
{
var mocker = new AutoMoqer();
mocker.GetMock<ConfigProvider>()
.SetupGet(c => c.NzbMatrixUsername)
.Returns("");
mocker.GetMock<ConfigProvider>()
.SetupGet(c => c.NzbMatrixApiKey)
.Returns("");
mocker.Resolve<HttpProvider>();
var result = mocker.Resolve<NzbMatrix>().FetchEpisode("Blue Bloods", 1, 19);
result.Should().NotBeEmpty();
result.Should().OnlyContain(r => r.CleanTitle == "bluebloods");
result.Should().OnlyContain(r => r.SeasonNumber == 1);
result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(19));
}
}
}

@ -42,7 +42,14 @@ namespace NzbDrone.Core.Providers.Indexer
protected override IList<string> GetSearchUrls(string seriesTitle, int seasonNumber, int episodeNumber)
{
return new List<string>();
var searchUrls = new List<String>();
foreach (var url in Urls)
{
searchUrls.Add(String.Format("{0}&term={1}+s{2:00}e{3:00}", url, GetQueryTitle(seriesTitle), seasonNumber, episodeNumber));
}
return searchUrls;
}
}

@ -194,7 +194,7 @@ namespace NzbDrone.Core.Providers
var episodeTotal = allEpisodes.Where(e => !e.Ignored && e.AirDate <= DateTime.Today && e.AirDate.Year > 1900).ToList();
var avilableEpisodes = episodeTotal.Where(e => e.EpisodeFileId > 0);
return new Tuple<int, int>(episodeTotal.Count, avilableEpisodes.Count());
return new Tuple<int, int>(avilableEpisodes.Count(), episodeTotal.Count);
}
private List<string> GetMediaFileList(string path)

@ -30,6 +30,7 @@ namespace NzbDrone.Web.Controllers
var upcoming = _upcomingEpisodesProvider.Yesterday().Select(e => new UpcomingEpisodeModel
{
SeriesId = e.Series.SeriesId,
EpisodeId = e.EpisodeId,
SeriesName = e.Series.Title,
SeasonNumber = e.SeasonNumber,
EpisodeNumber = e.EpisodeNumber,

@ -5,6 +5,7 @@ namespace NzbDrone.Web.Models
public class UpcomingEpisodeModel
{
public int SeriesId { get; set; }
public int EpisodeId { get; set; }
public string SeriesName { get; set; }
public int SeasonNumber { get; set; }
public int EpisodeNumber { get; set; }

Loading…
Cancel
Save