Parser will remove quotes before trying to get filename from the path.

HistoryController - Gets Series from seriesProvider.
UpcomingComtroller - Gets Series from seriesProvider.
pull/3113/head
Mark McDowall 14 years ago
parent f11b4af305
commit d28e94868c

@ -38,6 +38,8 @@ namespace NzbDrone.Core.Test
[TestCase("The.Office.S03E115.DVDRip.XviD-OSiTV", "The.Office", 3, 115)]
[TestCase(@"Parks and Recreation - S02E21 - 94 Meetings - 720p TV.mkv", "Parks and Recreation", 2, 21)]
[TestCase(@"24-7 Penguins-Capitals- Road to the NHL Winter Classic - S01E03 - Episode 3.mkv", "24-7 Penguins-Capitals- Road to the NHL Winter Classic", 1, 3)]
[TestCase("Adventure.Inc.S03E19.DVDRip.\"XviD\"-OSiTV", "Adventure.Inc", 3, 19)]
[TestCase("C:/Test/TV/Chuck.4x05.HDTV.XviD-LOL", "Chuck", 4, 5)]
public void episode_parse(string postTitle, string title, int season, int episode)
{
var result = Parser.ParseEpisodeInfo(postTitle);

@ -305,9 +305,7 @@
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

@ -46,7 +46,7 @@ namespace NzbDrone.Core
private static readonly Regex NormalizeRegex = new Regex(@"((^|\W)(a|an|the|and|or|of)($|\W))|\W|(?:(?<=[^0-9]+)|\b)(?!(?:19\d{2}|20\d{2}))\d+(?=[^0-9ip]+|\b)",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[x|h]264|\<|\>|\?|\*|\:|\|",
private static readonly Regex SimpleTitleRegex = new Regex(@"480[i|p]|720[i|p]|1080[i|p]|[x|h]264|\<|\>|\?|\*|\:|\||""",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
/// <summary>

@ -13,11 +13,14 @@ namespace NzbDrone.Web.Controllers
{
private readonly HistoryProvider _historyProvider;
private readonly EpisodeProvider _episodeProvider;
private readonly SeriesProvider _seriesProvider;
public HistoryController(HistoryProvider historyProvider, EpisodeProvider episodeProvider)
public HistoryController(HistoryProvider historyProvider, EpisodeProvider episodeProvider,
SeriesProvider seriesProvider)
{
_historyProvider = historyProvider;
_episodeProvider = episodeProvider;
_seriesProvider = seriesProvider;
}
//
@ -43,17 +46,14 @@ namespace NzbDrone.Web.Controllers
[GridAction]
public ActionResult _AjaxBinding()
{
//TODO: possible subsonic bug, IQuarible causes some issues so ToList() is called
//https://github.com/subsonic/SubSonic-3.0/issues/263
var historyDb = _historyProvider.AllItems().ToList();
var historyDb = _historyProvider.AllItems();
var history = new List<HistoryModel>();
foreach (var item in historyDb)
{
var episode = _episodeProvider.GetEpisode(item.EpisodeId);
var series = _seriesProvider.GetSeries(item.SeriesId);
history.Add(new HistoryModel
{
@ -62,7 +62,7 @@ namespace NzbDrone.Web.Controllers
EpisodeNumber = episode.EpisodeNumber,
EpisodeTitle = episode.Title,
EpisodeOverview = episode.Overview,
SeriesTitle = episode.Series.Title,
SeriesTitle = series.Title,
NzbTitle = item.NzbTitle,
Quality = item.Quality.ToString(),
IsProper = item.IsProper,

@ -11,10 +11,12 @@ namespace NzbDrone.Web.Controllers
public class UpcomingController : Controller
{
private readonly UpcomingEpisodesProvider _upcomingEpisodesProvider;
private readonly SeriesProvider _seriesProvider;
public UpcomingController(UpcomingEpisodesProvider upcomingEpisodesProvider)
public UpcomingController(UpcomingEpisodesProvider upcomingEpisodesProvider, SeriesProvider seriesProvider)
{
_upcomingEpisodesProvider = upcomingEpisodesProvider;
_seriesProvider = seriesProvider;
}
//
@ -33,7 +35,7 @@ namespace NzbDrone.Web.Controllers
foreach (var item in upcomingDb)
{
var series = item.Series;
var series = _seriesProvider.GetSeries(item.SeriesId);
upcoming.Add(new UpcomingEpisodeModel
{
@ -59,7 +61,7 @@ namespace NzbDrone.Web.Controllers
foreach (var item in upcomingDb)
{
var series = item.Series;
var series = _seriesProvider.GetSeries(item.SeriesId);
upcoming.Add(new UpcomingEpisodeModel
{
@ -85,7 +87,7 @@ namespace NzbDrone.Web.Controllers
foreach (var item in upcomingDb)
{
var series = item.Series;
var series = _seriesProvider.GetSeries(item.SeriesId);
upcoming.Add(new UpcomingEpisodeModel
{
@ -111,7 +113,7 @@ namespace NzbDrone.Web.Controllers
foreach (var item in upcomingDb)
{
var series = item.Series;
var series = _seriesProvider.GetSeries(item.SeriesId);
upcoming.Add(new UpcomingEpisodeModel
{

Loading…
Cancel
Save