mirror of https://github.com/lidarr/Lidarr
Added quality to Series detail view
This commit is contained in:
parent
d310c06f2e
commit
79a0f09b43
|
@ -9,6 +9,7 @@ using System.Web.Mvc;
|
||||||
using NzbDrone.Core.Model;
|
using NzbDrone.Core.Model;
|
||||||
using NzbDrone.Core.Providers;
|
using NzbDrone.Core.Providers;
|
||||||
using NzbDrone.Core.Repository;
|
using NzbDrone.Core.Repository;
|
||||||
|
using NzbDrone.Core.Repository.Quality;
|
||||||
using NzbDrone.Web.Models;
|
using NzbDrone.Web.Models;
|
||||||
using Telerik.Web.Mvc;
|
using Telerik.Web.Mvc;
|
||||||
using TvdbLib.Data;
|
using TvdbLib.Data;
|
||||||
|
@ -138,7 +139,9 @@ namespace NzbDrone.Web.Controllers
|
||||||
Title = c.Title,
|
Title = c.Title,
|
||||||
Overview = c.Overview,
|
Overview = c.Overview,
|
||||||
AirDate = c.AirDate,
|
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));
|
return View(new GridModel(episodes));
|
||||||
}
|
}
|
||||||
|
@ -168,7 +171,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
//We still want to show this series as unmapped, but we don't know what it will be when mapped
|
//We still want to show this series as unmapped, but we don't know what it will be when mapped
|
||||||
//Todo: Provide the user with a way to manually map a folder to a TvDb series (or make them rename the folder...)
|
//Todo: Provide the user with a way to manually map a folder to a TvDb series (or make them rename the folder...)
|
||||||
if (tvDbSeries == null)
|
if (tvDbSeries == null)
|
||||||
tvDbSeries = new TvdbSeries {Id = 0, SeriesName = String.Empty};
|
tvDbSeries = new TvdbSeries { Id = 0, SeriesName = String.Empty };
|
||||||
|
|
||||||
unmappedList.Add(new AddExistingSeriesModel
|
unmappedList.Add(new AddExistingSeriesModel
|
||||||
{
|
{
|
||||||
|
@ -199,10 +202,10 @@ namespace NzbDrone.Web.Controllers
|
||||||
//If the TvDbId for this show is 0 then skip it... User made a mistake... They will have to manually map it
|
//If the TvDbId for this show is 0 then skip it... User made a mistake... They will have to manually map it
|
||||||
if (tvDbId < 1) continue;
|
if (tvDbId < 1) continue;
|
||||||
|
|
||||||
unmappedList.Add(new SeriesMappingModel{Path = path, TvDbId = tvDbId, QualityProfileId = qualityProfileId});
|
unmappedList.Add(new SeriesMappingModel { Path = path, TvDbId = tvDbId, QualityProfileId = qualityProfileId });
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_syncProvider.BeginSyncUnmappedFolders(unmappedList))
|
if (_syncProvider.BeginSyncUnmappedFolders(unmappedList))
|
||||||
return Content("Sync Started for Selected Series");
|
return Content("Sync Started for Selected Series");
|
||||||
|
|
||||||
return Content("Sync already in progress, please wait for it to complete before retrying.");
|
return Content("Sync already in progress, please wait for it to complete before retrying.");
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
|
using NzbDrone.Core.Repository.Quality;
|
||||||
|
|
||||||
namespace NzbDrone.Web.Models
|
namespace NzbDrone.Web.Models
|
||||||
{
|
{
|
||||||
|
@ -14,5 +15,7 @@ namespace NzbDrone.Web.Models
|
||||||
public string Overview { get; set; }
|
public string Overview { get; set; }
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
public DateTime AirDate { get; set; }
|
public DateTime AirDate { get; set; }
|
||||||
|
|
||||||
|
public String Quality { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -66,13 +66,14 @@
|
||||||
.Width(1)
|
.Width(1)
|
||||||
.HtmlAttributes(new { style = "text-align:center" });
|
.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.Title).Title("Title");
|
||||||
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
|
columns.Bound(c => c.AirDate).Format("{0:d}").Width(0);
|
||||||
|
columns.Bound(c => c.Quality);
|
||||||
columns.Bound(c => c.Path);
|
columns.Bound(c => c.Path);
|
||||||
})
|
})
|
||||||
//.DetailView(detailView => detailView.Template(e => Html.RenderPartial("EpisodeDetail", e)))
|
//.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))
|
.Sortable(rows => rows.OrderBy(epSort => epSort.Add(c => c.EpisodeNumber).Descending()).Enabled(true))
|
||||||
.Footer(false)
|
.Footer(false)
|
||||||
.DataBinding(d => d.Ajax().Select("_AjaxSeasonGrid", "Series", new RouteValueDictionary { { "seasonId", season1.SeasonId.ToString() } }))
|
.DataBinding(d => d.Ajax().Select("_AjaxSeasonGrid", "Series", new RouteValueDictionary { { "seasonId", season1.SeasonId.ToString() } }))
|
||||||
|
|
Loading…
Reference in New Issue