Some performance tweaks to speed up episode list view.

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

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

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

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

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

Loading…
Cancel
Save