mirror of
https://github.com/Radarr/Radarr
synced 2024-12-24 17:01:38 +00:00
Some performance tweaks to speed up episode list view.
This commit is contained in:
parent
e547792020
commit
18a20ff163
4 changed files with 11 additions and 33 deletions
|
@ -49,15 +49,17 @@ public EpisodeStatusType Status
|
|||
{
|
||||
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 @@ public ActionResult RssSync()
|
|||
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 @@ private string GetEpisodePath(EpisodeFile file)
|
|||
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…
Reference in a new issue