mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-16 23:39:44 +02:00
Merge branch 'master' of git://github.com/kayone/NzbDrone
This commit is contained in:
commit
dd2480dbbe
@ -9,6 +9,7 @@
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Repository;
|
||||
using NzbDrone.Core.Repository.Quality;
|
||||
using NzbDrone.Web.Models;
|
||||
using Telerik.Web.Mvc;
|
||||
using TvdbLib.Data;
|
||||
@ -138,7 +139,9 @@ public ActionResult _AjaxSeasonGrid(int seasonId)
|
||||
Title = c.Title,
|
||||
Overview = c.Overview,
|
||||
AirDate = c.AirDate,
|
||||
Path = GetEpisodePath(c.EpisodeFile)
|
||||
Path = GetEpisodePath(c.EpisodeFile),
|
||||
Quality = c.EpisodeFile == null ? String.Empty : c.EpisodeFile.Quality.ToString()
|
||||
|
||||
});
|
||||
return View(new GridModel(episodes));
|
||||
}
|
||||
@ -387,15 +390,6 @@ public ActionResult RenameEpisode(int episodeId)
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
public ActionResult ReScanFiles(int seriesId)
|
||||
{
|
||||
var epFiles = _mediaFileProvider.GetEpisodeFiles().Where(s => s.SeriesId == seriesId).ToList();
|
||||
_mediaFileProvider.CleanUp(epFiles);
|
||||
_mediaFileProvider.Scan(_seriesProvider.GetSeries(seriesId));
|
||||
|
||||
return RedirectToAction("Details", "Series", new { seriesId });
|
||||
}
|
||||
|
||||
//Local Helpers
|
||||
private string GetEpisodePath(EpisodeFile file)
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using NzbDrone.Core.Repository.Quality;
|
||||
|
||||
namespace NzbDrone.Web.Models
|
||||
{
|
||||
@ -14,5 +15,7 @@ public class EpisodeModel
|
||||
public string Overview { get; set; }
|
||||
public string Path { get; set; }
|
||||
public DateTime AirDate { get; set; }
|
||||
|
||||
public String Quality { get; set; }
|
||||
}
|
||||
}
|
@ -14,7 +14,6 @@
|
||||
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("Rename Series").Action("RenameSeries", "Series", new { seriesId = Model.SeriesId });
|
||||
items.Add().Text("Re-Scan Files").Action("ReScanFiles", "Series", new { seriesId = Model.SeriesId });
|
||||
}).Render();
|
||||
%>
|
||||
</asp:Content>
|
||||
@ -66,13 +65,14 @@
|
||||
.Width(1)
|
||||
.HtmlAttributes(new { style = "text-align:center" });
|
||||
|
||||
columns.Bound(c => c.EpisodeNumber).Width(0).Title("Episode");
|
||||
columns.Bound(c => c.EpisodeNumber).Width(10).Title("Episode");
|
||||
columns.Bound(c => c.Title).Title("Title");
|
||||
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
|
||||
columns.Bound(c => c.Quality);
|
||||
columns.Bound(c => c.Path);
|
||||
})
|
||||
//.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
|
||||
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #></div>"))
|
||||
.DetailView(detailView => detailView.ClientTemplate("<div><#= Overview #> </br><#= Path #> </div>"))
|
||||
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
|
||||
.Footer(false)
|
||||
.DataBinding(d => d.Ajax().Select("_AjaxSeasonGrid", "Series", new RouteValueDictionary { { "seasonId", season1.SeasonId.ToString() } }))
|
||||
|
@ -13,20 +13,16 @@
|
||||
.Add("notibar.css"))
|
||||
.Render();
|
||||
%>
|
||||
|
||||
<link href="../../Content/style.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../Content/jquery-ui.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../Content/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../Content/jquery-simpledropdown.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="../../Scripts/jquery-1.5.1.min.js"></script>
|
||||
<%--<script type="text/javascript" src="../../Scripts/jquery-ui-1.8.8.min.js"></script>--%>
|
||||
<asp:ContentPlaceHolder ID="headerContent" runat="server"></asp:ContentPlaceHolder>
|
||||
<asp:ContentPlaceHolder ID="headerContent" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://github.com/kayone/NzbDrone">
|
||||
<img style="position: absolute; top: 0; left: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png" alt="ForkMe"/>
|
||||
</a>
|
||||
|
||||
<div id="centered">
|
||||
<div id="menu">
|
||||
<ul>
|
||||
@ -52,7 +48,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<asp:ContentPlaceHolder runat="server" id="Scripts" />
|
||||
<asp:contentplaceholder runat="server" id="Scripts" />
|
||||
<% Html.Telerik().ScriptRegistrar().Scripts(
|
||||
c => c.Add("jquery-ui-1.8.8.min.js")
|
||||
.Add("jquery.form.js")
|
||||
|
Loading…
Reference in New Issue
Block a user