Merge branch 'markus101'

pull/4/head
kay.one 14 years ago
commit 31c16b9004

@ -241,8 +241,6 @@ namespace NzbDrone.Core.Providers
tvDbSeriesInfo.SeriesName, successCount, failCount); tvDbSeriesInfo.SeriesName, successCount, failCount);
} }
public virtual void UpdateEpisode(Episode episode) public virtual void UpdateEpisode(Episode episode)
{ {
_database.Update(episode); _database.Update(episode);

@ -118,19 +118,29 @@ namespace NzbDrone.Core.Providers
public virtual Series FindSeries(string title) public virtual Series FindSeries(string title)
{ {
var normalizeTitle = Parser.NormalizeTitle(title); try
var seriesId = _sceneNameMappingProvider.GetSeriesId(normalizeTitle);
if (seriesId != null)
{ {
return GetSeries(seriesId.Value); var normalizeTitle = Parser.NormalizeTitle(title);
}
var series = _database.Fetch<Series, QualityProfile>(@"SELECT * FROM Series var seriesId = _sceneNameMappingProvider.GetSeriesId(normalizeTitle);
if (seriesId != null)
{
return GetSeries(seriesId.Value);
}
var series = _database.Fetch<Series, QualityProfile>(@"SELECT * FROM Series
INNER JOIN QualityProfiles ON Series.QualityProfileId = QualityProfiles.QualityProfileId INNER JOIN QualityProfiles ON Series.QualityProfileId = QualityProfiles.QualityProfileId
WHERE CleanTitle = @0", normalizeTitle).FirstOrDefault(); WHERE CleanTitle = @0", normalizeTitle).FirstOrDefault();
return series; return series;
}
//This will catch InvalidOperationExceptions that may be thrown for GetSeries due to the series being in SceneMapping, but not in the users Database
catch (InvalidOperationException ex)
{
Logger.DebugException(ex.Message, ex);
return null;
}
} }
public virtual void UpdateSeries(Series series) public virtual void UpdateSeries(Series series)

@ -46,7 +46,7 @@ namespace NzbDrone.Core.Repository
[Ignore] [Ignore]
public bool Hidden { get; set; } public bool Hidden { get; set; }
[Ignore] [ResultColumn]
public QualityProfile QualityProfile { get; set; } public QualityProfile QualityProfile { get; set; }
[ResultColumn] [ResultColumn]

@ -215,6 +215,7 @@ namespace NzbDrone.Web.Controllers
{ {
Id = 0, Id = 0,
Path = "", Path = "",
CleanPath = "",
SelectList = new SelectList(new List<string> { "" }, "") SelectList = new SelectList(new List<string> { "" }, "")
}; };

@ -12,15 +12,10 @@ namespace NzbDrone.Web.Controllers
public class HistoryController : Controller public class HistoryController : Controller
{ {
private readonly HistoryProvider _historyProvider; private readonly HistoryProvider _historyProvider;
private readonly EpisodeProvider _episodeProvider;
private readonly SeriesProvider _seriesProvider;
public HistoryController(HistoryProvider historyProvider, EpisodeProvider episodeProvider, public HistoryController(HistoryProvider historyProvider)
SeriesProvider seriesProvider)
{ {
_historyProvider = historyProvider; _historyProvider = historyProvider;
_episodeProvider = episodeProvider;
_seriesProvider = seriesProvider;
} }
// //

@ -11,12 +11,10 @@ namespace NzbDrone.Web.Controllers
public class UpcomingController : Controller public class UpcomingController : Controller
{ {
private readonly UpcomingEpisodesProvider _upcomingEpisodesProvider; private readonly UpcomingEpisodesProvider _upcomingEpisodesProvider;
private readonly SeriesProvider _seriesProvider;
public UpcomingController(UpcomingEpisodesProvider upcomingEpisodesProvider, SeriesProvider seriesProvider) public UpcomingController(UpcomingEpisodesProvider upcomingEpisodesProvider)
{ {
_upcomingEpisodesProvider = upcomingEpisodesProvider; _upcomingEpisodesProvider = upcomingEpisodesProvider;
_seriesProvider = seriesProvider;
} }
// //

@ -1,7 +1,13 @@
@model List<RootDir> @model List<RootDir>
@using NzbDrone.Core.Repository @using NzbDrone.Core.Repository
<script type="text/javascript" src="../../Scripts/2011.1.315/telerik.window.min.js"></script> @{ Html.Telerik().ScriptRegistrar().DefaultGroup(group => group
.Add("telerik.common.min.js")
.Add("telerik.draganddrop.min.js")
.Add("telerik.window.min.js")
.Add("telerik.panelbar.min.js")
.Add("telerik.list.min.js")
.Add("telerik.combobox.min.js")); }
<style> <style>
.root_dir_text .root_dir_text

Loading…
Cancel
Save