mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Fixed styling for add series dropdown
Fixed: Adding a series is now blocked unless a valid root folder is provided
This commit is contained in:
parent
a4c433c5b2
commit
9669869c9b
6 changed files with 14 additions and 23 deletions
|
@ -119,7 +119,7 @@ hr
|
||||||
background: url(images/logo.png) no-repeat left top;
|
background: url(images/logo.png) no-repeat left top;
|
||||||
background-color: #065EFE;
|
background-color: #065EFE;
|
||||||
font-size: 110px;
|
font-size: 110px;
|
||||||
color: rgb(249, 249, 249);
|
color: white;
|
||||||
/**color: rgb(40, 40, 40);**/
|
/**color: rgb(40, 40, 40);**/
|
||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
letter-spacing: -1px;
|
letter-spacing: -1px;
|
||||||
|
|
|
@ -105,6 +105,9 @@ namespace NzbDrone.Web.Controllers
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int qualityProfileId)
|
public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int qualityProfileId)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(path) || String.Equals(path,"null",StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
return JsonNotificationResult.Error("Couldn't add " + seriesName, "You need a valid root folder");
|
||||||
|
|
||||||
path = Path.Combine(path, MediaFileProvider.CleanFilename(seriesName));
|
path = Path.Combine(path, MediaFileProvider.CleanFilename(seriesName));
|
||||||
|
|
||||||
//Create the folder for the new series
|
//Create the folder for the new series
|
||||||
|
@ -174,8 +177,10 @@ namespace NzbDrone.Web.Controllers
|
||||||
var tvDbResults = _tvDbProvider.SearchSeries(term).Select(r => new TvDbSearchResultModel
|
var tvDbResults = _tvDbProvider.SearchSeries(term).Select(r => new TvDbSearchResultModel
|
||||||
{
|
{
|
||||||
Id = r.Id,
|
Id = r.Id,
|
||||||
Title = r.SeriesName,
|
Title = r.FirstAired.Year > 1900
|
||||||
FirstAired = r.FirstAired.ToShortDateString()
|
?string.Format("{0} ({1})", r.SeriesName, r.FirstAired.Year)
|
||||||
|
:r.SeriesName,
|
||||||
|
Banner = r.Banner.BannerPath
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
return Json(tvDbResults, JsonRequestBehavior.AllowGet);
|
return Json(tvDbResults, JsonRequestBehavior.AllowGet);
|
||||||
|
|
|
@ -49,14 +49,6 @@ namespace NzbDrone.Web.Controllers
|
||||||
_seriesProvider = seriesProvider;
|
_seriesProvider = seriesProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
public JsonResult TestResults(string q)
|
|
||||||
{
|
|
||||||
var results = new List<TvDbSearchResultModel>();
|
|
||||||
results.Add(new TvDbSearchResultModel { Id = 1, Title = "30 Rock", FirstAired = DateTime.Today.ToShortDateString() });
|
|
||||||
results.Add(new TvDbSearchResultModel { Id = 2, Title = "The Office", FirstAired = DateTime.Today.AddDays(-1).ToShortDateString() });
|
|
||||||
|
|
||||||
return Json(results, JsonRequestBehavior.AllowGet);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionResult Index()
|
public ActionResult Index()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
using System;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace NzbDrone.Web.Models
|
namespace NzbDrone.Web.Models
|
||||||
{
|
{
|
||||||
|
@ -9,6 +6,6 @@ namespace NzbDrone.Web.Models
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string FirstAired { get; set; }
|
public string Banner { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -65,7 +65,7 @@ function bindSeriesAutoComplete(selector) {
|
||||||
.data("autocomplete")._renderItem = function (ul, item) {
|
.data("autocomplete")._renderItem = function (ul, item) {
|
||||||
return $("<li></li>")
|
return $("<li></li>")
|
||||||
.data("item.autocomplete", item)
|
.data("item.autocomplete", item)
|
||||||
.append("<a><div class=seriesLookupTitle>" + item.Title + "</div><div class=seriesLookupFirstAired>" + item.FirstAired + "</div></a>")
|
.append("<a><div class=seriesLookupTitle>" + item.Title + "</div></a>")
|
||||||
.appendTo(ul);
|
.appendTo(ul);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -42,15 +42,12 @@
|
||||||
background-size: 18px 18px
|
background-size: 18px 18px
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-autocomplete .seriesLookupTitle {
|
.ui-autocomplete .seriesLookupTitle{
|
||||||
font-size: 110%;
|
font-size: 110%;
|
||||||
font-family: "Segoe UI Light", "Open Sans", "Segoe UI", sans-serif;
|
font-family: "Segoe UI", "Open Sans", "Segoe UI", sans-serif;
|
||||||
color: lightgrey;
|
color: lightgrey;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-autocomplete .seriesLookupFirstAired {
|
|
||||||
font-family: "Segoe UI Light", "Open Sans", "Segoe UI", sans-serif;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue