Some performance tweaks to speed up episode list view.

pull/3113/head
kay.one 14 years ago
parent e547792020
commit 18a20ff163

@ -49,15 +49,17 @@ namespace NzbDrone.Core.Repository
{
get
{
if (Ignored || (Season != null && !Season.Monitored)) return EpisodeStatusType.Ignored;
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
var season = Season;
if (Ignored || (season != null && !season.Monitored)) return EpisodeStatusType.Ignored;
if (GrabDate != null && GrabDate.Value.AddDays(1) >= DateTime.Now)
{
return EpisodeStatusType.Downloading;
}
if (EpisodeFileId != 0) return EpisodeStatusType.Ready;
if (AirDate.Date.Year > 1900 && DateTime.Now.Date >= AirDate.Date)
{
return EpisodeStatusType.Missing;

@ -55,15 +55,6 @@ namespace NzbDrone.Web.Controllers
return RedirectToAction("Index");
}
public ActionResult LoadEpisodes(int seriesId)
{
_episodeProvider.RefreshEpisodeInfo(seriesId);
return RedirectToAction("Details", new
{
seriesId
});
}
public ActionResult SeasonEditor(int seriesId)
{
var model =
@ -149,7 +140,7 @@ namespace NzbDrone.Web.Controllers
return String.Empty;
//Return the path relative to the Series' Folder
return file.Path.Replace(file.Series.Path, "").Trim(Path.DirectorySeparatorChar);
return file.Path;
}
public ActionResult SearchForSeries(string seriesName)

@ -871,9 +871,6 @@
<ItemGroup>
<Content Include="Views\Series\SingleSeason.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\AddSeries\Copy of AddNew.cshtml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

@ -7,23 +7,11 @@
@section ActionMenu{
@{Html.Telerik().Menu().Name("SeriesMenu").Items(items =>
{
items.Add().Text("Back to Series List").Action("Index",
"Series");
items.Add().Text("Scan For Episodes on Disk").Action(
"SyncEpisodesOnDisk", "Series",
new { seriesId = Model.SeriesId });
items.Add().Text("Update Info").Action(
"UpdateInfo", "Series",
new { seriesId = Model.SeriesId });
items.Add().Text("Rename Series").Action("RenameSeries",
"Series",
new
{
seriesId
=
Model.
SeriesId
});
items.Add().Text("Back to Series List").Action("Index", "Series");
items.Add().Text("Scan For Episodes on Disk")
.Action("SyncEpisodesOnDisk", "Series", new { seriesId = Model.SeriesId });
items.Add().Text("Update Info").Action("UpdateInfo", "Series", new { seriesId = Model.SeriesId });
items.Add().Text("Rename Series").Action("RenameSeries", "Series", new { seriesId = Model.SeriesId });
}).Render();}
}
@section MainContent{

Loading…
Cancel
Save