mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-10 23:29:53 +02:00
Updated Add Series
This commit is contained in:
parent
68321c98d0
commit
b4fb3002a4
@ -138,9 +138,9 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\Libraries\Migrator.NET\Migrator.Providers.dll</HintPath>
|
<HintPath>..\Libraries\Migrator.NET\Migrator.Providers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MvcMiniProfiler, Version=1.4.4195.37960, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MvcMiniProfiler, Version=1.6.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\MiniProfiler.1.4\lib\MvcMiniProfiler.dll</HintPath>
|
<HintPath>..\packages\MiniProfiler.1.6\lib\MvcMiniProfiler.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Ninject, Version=2.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
<Reference Include="Ninject, Version=2.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
|
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -195,12 +195,12 @@ public virtual void RefreshEpisodeInfo(Series series)
|
|||||||
Logger.Trace("Updating info for [{0}] - S{1}E{2}", tvDbSeriesInfo.SeriesName, episode.SeasonNumber, episode.EpisodeNumber);
|
Logger.Trace("Updating info for [{0}] - S{1}E{2}", tvDbSeriesInfo.SeriesName, episode.SeasonNumber, episode.EpisodeNumber);
|
||||||
|
|
||||||
//first check using tvdbId, this should cover cases when and episode number in a season is changed
|
//first check using tvdbId, this should cover cases when and episode number in a season is changed
|
||||||
var episodeToUpdate = seriesEpisodes.Where(e => e.TvDbEpisodeId == episode.Id).FirstOrDefault();
|
var episodeToUpdate = seriesEpisodes.Where(e => e.TvDbEpisodeId == episode.Id).SingleOrDefault();
|
||||||
|
|
||||||
//not found, try using season/episode number
|
//not found, try using season/episode number
|
||||||
if (episodeToUpdate == null)
|
if (episodeToUpdate == null)
|
||||||
{
|
{
|
||||||
episodeToUpdate = seriesEpisodes.Where(e => e.SeasonNumber == episode.SeasonNumber && e.EpisodeNumber == episode.EpisodeNumber).FirstOrDefault();
|
episodeToUpdate = seriesEpisodes.Where(e => e.SeasonNumber == episode.SeasonNumber && e.EpisodeNumber == episode.EpisodeNumber).SingleOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Episode doesn't exist locally
|
//Episode doesn't exist locally
|
||||||
|
@ -171,6 +171,8 @@ private void ProcessQueue()
|
|||||||
{
|
{
|
||||||
Tuple<Type, int> job = null;
|
Tuple<Type, int> job = null;
|
||||||
|
|
||||||
|
using (NestedDiagnosticsContext.Push(Guid.NewGuid().ToString()))
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lock (Queue)
|
lock (Queue)
|
||||||
@ -198,6 +200,7 @@ private void ProcessQueue()
|
|||||||
Queue.Remove(job);
|
Queue.Remove(job);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} while (Queue.Count != 0);
|
} while (Queue.Count != 0);
|
||||||
|
|
||||||
@ -214,14 +217,14 @@ private void ProcessQueue()
|
|||||||
/// to allow it to filter it's target of execution</param>
|
/// to allow it to filter it's target of execution</param>
|
||||||
private void Execute(Type jobType, int targetId = 0)
|
private void Execute(Type jobType, int targetId = 0)
|
||||||
{
|
{
|
||||||
var jobImplementation = _jobs.Where(t => t.GetType() == jobType).FirstOrDefault();
|
var jobImplementation = _jobs.Where(t => t.GetType() == jobType).Single();
|
||||||
if (jobImplementation == null)
|
if (jobImplementation == null)
|
||||||
{
|
{
|
||||||
Logger.Error("Unable to locate implementation for '{0}'. Make sure it is properly registered.", jobType);
|
Logger.Error("Unable to locate implementation for '{0}'. Make sure it is properly registered.", jobType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var settings = All().Where(j => j.TypeName == jobType.ToString()).FirstOrDefault();
|
var settings = All().Where(j => j.TypeName == jobType.ToString()).Single();
|
||||||
|
|
||||||
using (_notification = new ProgressNotification(jobImplementation.Name))
|
using (_notification = new ProgressNotification(jobImplementation.Name))
|
||||||
{
|
{
|
||||||
@ -294,11 +297,7 @@ public virtual void Initialize()
|
|||||||
/// <returns>DateTime of next scheduled job execution</returns>
|
/// <returns>DateTime of next scheduled job execution</returns>
|
||||||
public virtual DateTime NextScheduledRun(Type jobType)
|
public virtual DateTime NextScheduledRun(Type jobType)
|
||||||
{
|
{
|
||||||
var job = All().Where(t => t.TypeName == jobType.ToString()).FirstOrDefault();
|
var job = All().Where(t => t.TypeName == jobType.ToString()).Single();
|
||||||
|
|
||||||
if (job == null)
|
|
||||||
return DateTime.Now;
|
|
||||||
|
|
||||||
return job.LastExecution.AddMinutes(job.Interval);
|
return job.LastExecution.AddMinutes(job.Interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,8 +74,10 @@ public List<String> GetUnmappedFolders(string path)
|
|||||||
var cleanPath = Parser.NormalizePath(new DirectoryInfo(seriesFolder).FullName);
|
var cleanPath = Parser.NormalizePath(new DirectoryInfo(seriesFolder).FullName);
|
||||||
|
|
||||||
if (!_seriesProvider.SeriesPathExists(cleanPath))
|
if (!_seriesProvider.SeriesPathExists(cleanPath))
|
||||||
|
{
|
||||||
results.Add(cleanPath);
|
results.Add(cleanPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Logger.Debug("{0} unmapped folders detected.", results.Count);
|
Logger.Debug("{0} unmapped folders detected.", results.Count);
|
||||||
return results;
|
return results;
|
||||||
|
@ -130,7 +130,7 @@ public virtual Series FindSeries(string title)
|
|||||||
|
|
||||||
var series = _database.Fetch<Series, QualityProfile>(@"SELECT * FROM Series
|
var series = _database.Fetch<Series, QualityProfile>(@"SELECT * FROM Series
|
||||||
INNER JOIN QualityProfiles ON Series.QualityProfileId = QualityProfiles.QualityProfileId
|
INNER JOIN QualityProfiles ON Series.QualityProfileId = QualityProfiles.QualityProfileId
|
||||||
WHERE CleanTitle = @0", normalizeTitle).FirstOrDefault();
|
WHERE CleanTitle = @0", normalizeTitle).SingleOrDefault();
|
||||||
|
|
||||||
return series;
|
return series;
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="Ninject" version="2.2.1.4" />
|
<package id="Ninject" version="2.2.1.4" />
|
||||||
<package id="SqlServerCompact" version="4.0.8482.1" />
|
<package id="SqlServerCompact" version="4.0.8482.1" />
|
||||||
<package id="MiniProfiler" version="1.4" />
|
<package id="MiniProfiler" version="1.6" />
|
||||||
</packages>
|
</packages>
|
@ -1,7 +1,7 @@
|
|||||||
.actionButton
|
.actionButton
|
||||||
{
|
{
|
||||||
margin: 5px 5px 5px 5px;
|
margin: 5px 5px 5px 5px;
|
||||||
padding: 5px 10px 5px 10px;
|
padding: 3px 10px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 5px center;
|
background-position: 5px center;
|
||||||
background-color: #cccccc;
|
background-color: #cccccc;
|
||||||
|
@ -46,7 +46,6 @@ table
|
|||||||
caption, th, td
|
caption, th, td
|
||||||
{
|
{
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: normal;
|
|
||||||
float: none !important;
|
float: none !important;
|
||||||
}
|
}
|
||||||
table, th, td
|
table, th, td
|
||||||
@ -80,11 +79,9 @@ body
|
|||||||
font-size: 75%;
|
font-size: 75%;
|
||||||
color: #222;
|
color: #222;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
font-family: "Helvetica Neue" , Arial, Helvetica, sans-serif;
|
|
||||||
}
|
}
|
||||||
h1, h2, h3, h4, h5, h6
|
h1, h2, h3, h4, h5, h6
|
||||||
{
|
{
|
||||||
font-weight: normal;
|
|
||||||
color: #111;
|
color: #111;
|
||||||
}
|
}
|
||||||
h1
|
h1
|
||||||
@ -100,21 +97,19 @@ h2
|
|||||||
}
|
}
|
||||||
h3
|
h3
|
||||||
{
|
{
|
||||||
|
margin-top: 0.75em;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
}
|
||||||
h4
|
h4
|
||||||
{
|
{
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
margin-bottom: 1.25em;
|
|
||||||
}
|
}
|
||||||
h5
|
h5
|
||||||
{
|
{
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 1.5em;
|
|
||||||
}
|
}
|
||||||
h6
|
h6
|
||||||
{
|
{
|
||||||
@ -162,10 +157,7 @@ blockquote
|
|||||||
color: #666;
|
color: #666;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
strong, dfn
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
em, dfn
|
em, dfn
|
||||||
{
|
{
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
@ -192,11 +184,7 @@ pre
|
|||||||
margin: 1.5em 0;
|
margin: 1.5em 0;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
}
|
}
|
||||||
pre, code, tt
|
|
||||||
{
|
|
||||||
font: 1em 'andale mono' , 'lucida console' , monospace;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
li ul, li ol
|
li ul, li ol
|
||||||
{
|
{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -218,10 +206,7 @@ dl
|
|||||||
{
|
{
|
||||||
margin: 0 0 1.5em 0;
|
margin: 0 0 1.5em 0;
|
||||||
}
|
}
|
||||||
dl dt
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
dd
|
dd
|
||||||
{
|
{
|
||||||
margin-left: 1.5em;
|
margin-left: 1.5em;
|
||||||
@ -231,10 +216,7 @@ table
|
|||||||
margin-bottom: 1.4em;
|
margin-bottom: 1.4em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
th
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
thead th
|
thead th
|
||||||
{
|
{
|
||||||
background: #c3d9ff;
|
background: #c3d9ff;
|
||||||
@ -323,7 +305,6 @@ fieldset
|
|||||||
}
|
}
|
||||||
legend
|
legend
|
||||||
{
|
{
|
||||||
font-weight: bold;
|
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
margin-top: -0.2em;
|
margin-top: -0.2em;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
@ -1,17 +1,25 @@
|
|||||||
h1, h2, h3
|
|
||||||
|
*
|
||||||
{
|
{
|
||||||
color: #000000;
|
font-family: "Segoe UI" , "Segoe UI Light" , Tahoma, Geneva, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body
|
body
|
||||||
{
|
{
|
||||||
background: #191919 url(images/img07.jpg) no-repeat right top;
|
background: #191919 url(images/img07.jpg) no-repeat right top;
|
||||||
font-family: "Segoe UI" , "Segoe UI Light" , Tahoma, Geneva, sans-serif !important;
|
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #3C3C3C;
|
color: #3C3C3C;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6
|
||||||
|
{
|
||||||
|
font-family: "Segoe UI Light" , "Segoe UI" , Tahoma, Geneva, sans-serif;
|
||||||
|
color: #3C3C3C;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fieldset
|
fieldset
|
||||||
{
|
{
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
@ -60,7 +68,6 @@ hr
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
font-weight: normal;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
}
|
}
|
||||||
@ -160,8 +167,6 @@ button, input[type="button"], input[type="submit"], input[type="reset"]
|
|||||||
background-color: #065EFE;
|
background-color: #065EFE;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-color: #065EFE;
|
border-color: #065EFE;
|
||||||
padding: 5px 10px 5px 10px;
|
|
||||||
margin: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active
|
button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active
|
||||||
@ -171,17 +176,20 @@ button:active, input[type="button"]:active, input[type="submit"]:active, input[t
|
|||||||
|
|
||||||
input[type=text], select
|
input[type=text], select
|
||||||
{
|
{
|
||||||
font-size: larger;
|
font-size: small;
|
||||||
padding: 4px 2px;
|
padding: 2px 2px;
|
||||||
border: solid 1px #aacfe4;
|
border: solid 1px #aacfe4;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
margin: 2px 0 10px 10px;
|
margin: 2px 0 10px 0px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
select
|
|
||||||
|
select, button, input[type="button"], input[type="submit"], input[type="reset"]
|
||||||
{
|
{
|
||||||
height: 30px;
|
height: 26px;
|
||||||
|
min-width: 50px;
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.listButton
|
.listButton
|
||||||
@ -230,3 +238,10 @@ select
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.qualitySelector
|
||||||
|
{
|
||||||
|
min-width: 60px;
|
||||||
|
width: auto;
|
||||||
|
}
|
@ -16,3 +16,8 @@
|
|||||||
{
|
{
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.t-combobox .t-input
|
||||||
|
{
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
@ -67,70 +67,61 @@ public ActionResult AddNew()
|
|||||||
|
|
||||||
public ActionResult Index()
|
public ActionResult Index()
|
||||||
{
|
{
|
||||||
var rootDirs = _rootFolderProvider.GetAll();
|
return View();
|
||||||
|
|
||||||
var profiles = _qualityProvider.All();
|
|
||||||
var defaultQuality = Convert.ToInt32(_configProvider.DefaultQualityProfile);
|
|
||||||
var selectList = new SelectList(profiles, "QualityProfileId", "Name", defaultQuality);
|
|
||||||
ViewData["qualities"] = selectList;
|
|
||||||
ViewData["ShowRootDirs"] = false;
|
|
||||||
|
|
||||||
//There are no RootDirs Show the RootDirs Panel
|
|
||||||
if (rootDirs.Count == 0)
|
|
||||||
ViewData["ShowRootDirs"] = true;
|
|
||||||
|
|
||||||
return View(rootDirs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public ActionResult AddExisting()
|
public ActionResult ExistingSeries()
|
||||||
{
|
{
|
||||||
var rootDirs = _rootFolderProvider.GetAll();
|
var result = new ExistingSeriesModel();
|
||||||
|
|
||||||
var unmappedList = new List<String>();
|
var unmappedList = new List<String>();
|
||||||
|
|
||||||
foreach (var folder in rootDirs)
|
foreach (var folder in _rootFolderProvider.GetAll())
|
||||||
{
|
{
|
||||||
unmappedList.AddRange(_rootFolderProvider.GetUnmappedFolders(folder.Path));
|
unmappedList.AddRange(_rootFolderProvider.GetUnmappedFolders(folder.Path));
|
||||||
}
|
}
|
||||||
|
|
||||||
return View(unmappedList);
|
result.ExistingSeries = new List<Tuple<string, string>>();
|
||||||
|
|
||||||
|
foreach (var folder in unmappedList)
|
||||||
|
{
|
||||||
|
var foldername = new DirectoryInfo(folder).Name;
|
||||||
|
var tvdbResult = _tvDbProvider.SearchSeries(foldername).FirstOrDefault();
|
||||||
|
|
||||||
|
var title = String.Empty;
|
||||||
|
if (tvdbResult != null)
|
||||||
|
{
|
||||||
|
title = tvdbResult.SeriesName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult RenderPartial(string path)
|
result.ExistingSeries.Add(new Tuple<string, string>(folder, title));
|
||||||
{
|
}
|
||||||
var suggestions = GetSuggestionList(new DirectoryInfo(path).Name);
|
|
||||||
|
|
||||||
ViewData["guid"] = Guid.NewGuid();
|
var defaultQuality = Convert.ToInt32(_configProvider.DefaultQualityProfile);
|
||||||
ViewData["path"] = path;
|
result.Quality = new SelectList(_qualityProvider.All(), "QualityProfileId", "Name", defaultQuality);
|
||||||
ViewData["javaPath"] = path.Replace(Path.DirectorySeparatorChar, '|').Replace(Path.VolumeSeparatorChar, '^').Replace('\'', '`');
|
|
||||||
|
|
||||||
var defaultQuality = _configProvider.DefaultQualityProfile;
|
return View(result);
|
||||||
var qualityProfiles = _qualityProvider.All();
|
|
||||||
|
|
||||||
ViewData["quality"] = new SelectList(
|
|
||||||
qualityProfiles,
|
|
||||||
"QualityProfileId",
|
|
||||||
"Name",
|
|
||||||
defaultQuality);
|
|
||||||
|
|
||||||
return PartialView("AddSeriesItem", suggestions);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult AddNewSeries(string rootPath, string seriesName, int seriesId, int qualityProfileId)
|
public JsonResult AddNewSeries(string path, string seriesName, int qualityProfileId)
|
||||||
|
{
|
||||||
|
path = Path.Combine(path, MediaFileProvider.CleanFilename(seriesName));
|
||||||
|
return AddExistingSeries(path, seriesName, qualityProfileId);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public JsonResult AddExistingSeries(string path, string seriesName, int qualityProfileId)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var path = Path.Combine(rootPath.Replace('|', Path.DirectorySeparatorChar)
|
|
||||||
.Replace('^', Path.VolumeSeparatorChar)
|
|
||||||
.Replace('`', '\''),
|
|
||||||
MediaFileProvider.CleanFilename(seriesName));
|
|
||||||
|
|
||||||
//Create the folder for the new series and then Add it
|
//Create the folder for the new series and then Add it
|
||||||
_diskProvider.CreateDirectory(path);
|
_diskProvider.CreateDirectory(path);
|
||||||
|
|
||||||
_seriesProvider.AddSeries(path, seriesId, qualityProfileId);
|
var series = _tvDbProvider.SearchSeries(seriesName).Where(s => s.SeriesName == seriesName).Single();
|
||||||
|
|
||||||
|
_seriesProvider.AddSeries(path, series.Id, qualityProfileId);
|
||||||
ScanNewSeries();
|
ScanNewSeries();
|
||||||
return new JsonResult { Data = "ok" };
|
return new JsonResult { Data = "ok" };
|
||||||
}
|
}
|
||||||
@ -154,30 +145,6 @@ public JsonResult AddSeries(string path, int seriesId, int qualityProfileId)
|
|||||||
return new JsonResult { Data = "ok" };
|
return new JsonResult { Data = "ok" };
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
public ActionResult _textLookUp(string text, int? filterMode)
|
|
||||||
{
|
|
||||||
var suggestions = GetSuggestionList(text);
|
|
||||||
|
|
||||||
return new JsonResult
|
|
||||||
{
|
|
||||||
JsonRequestBehavior = JsonRequestBehavior.AllowGet,
|
|
||||||
Data = suggestions
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public SelectList GetSuggestionList(string searchString)
|
|
||||||
{
|
|
||||||
var dataVal = _tvDbProvider.SearchSeries(searchString);
|
|
||||||
|
|
||||||
int selectId = 0;
|
|
||||||
if (dataVal.Count != 0)
|
|
||||||
{
|
|
||||||
selectId = dataVal[0].Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new SelectList(dataVal, "Id", "SeriesName", selectId);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Root Directory
|
//Root Directory
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
@ -202,36 +169,15 @@ public JsonResult SaveRootDir(string path)
|
|||||||
return new JsonResult { };
|
return new JsonResult { };
|
||||||
}
|
}
|
||||||
|
|
||||||
public PartialViewResult AddRootDir()
|
[HttpGet]
|
||||||
|
public JsonResult LookupSeries(string q)
|
||||||
{
|
{
|
||||||
var model = new RootDirModel
|
|
||||||
{
|
|
||||||
Id = 0,
|
|
||||||
Path = "",
|
|
||||||
CleanPath = "",
|
|
||||||
SelectList = new SelectList(new List<string> { "" }, "")
|
|
||||||
};
|
|
||||||
|
|
||||||
ViewData["guid"] = Guid.NewGuid();
|
var dataVal = _tvDbProvider.SearchSeries(q);
|
||||||
|
|
||||||
return PartialView("RootDir", model);
|
return Json(dataVal.Select(c => new KeyValuePair<int, string>(c.Id, c.SeriesName)), JsonRequestBehavior.AllowGet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult GetRootDirView(RootDir rootDir)
|
|
||||||
{
|
|
||||||
var model = new RootDirModel
|
|
||||||
{
|
|
||||||
Id = rootDir.Id,
|
|
||||||
Path = rootDir.Path,
|
|
||||||
SelectList = new SelectList(new List<string> { rootDir.Path }, rootDir.Path)
|
|
||||||
};
|
|
||||||
|
|
||||||
ViewData["guid"] = Guid.NewGuid();
|
|
||||||
|
|
||||||
return PartialView("RootDir", model);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public ActionResult RootList()
|
public ActionResult RootList()
|
||||||
{
|
{
|
||||||
IEnumerable<String> rootDir = _rootFolderProvider.GetAll().Select(c => c.Path).OrderBy(e => e);
|
IEnumerable<String> rootDir = _rootFolderProvider.GetAll().Select(c => c.Path).OrderBy(e => e);
|
||||||
|
@ -14,6 +14,7 @@ public class HealthController : Controller
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public JsonResult Index()
|
public JsonResult Index()
|
||||||
{
|
{
|
||||||
|
MvcMiniProfiler.MiniProfiler.Stop(true);
|
||||||
return Json("OK", JsonRequestBehavior.AllowGet);
|
return Json("OK", JsonRequestBehavior.AllowGet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,6 @@ public ActionResult _AjaxSeriesGrid()
|
|||||||
public ActionResult _SaveAjaxSeriesEditing(int id, string path, bool monitored, bool seasonFolder, int qualityProfileId, List<SeasonEditModel> seasonEditor)
|
public ActionResult _SaveAjaxSeriesEditing(int id, string path, bool monitored, bool seasonFolder, int qualityProfileId, List<SeasonEditModel> seasonEditor)
|
||||||
{
|
{
|
||||||
var oldSeries = _seriesProvider.GetSeries(id);
|
var oldSeries = _seriesProvider.GetSeries(id);
|
||||||
oldSeries.Path = path;
|
|
||||||
oldSeries.Monitored = monitored;
|
oldSeries.Monitored = monitored;
|
||||||
oldSeries.SeasonFolder = seasonFolder;
|
oldSeries.SeasonFolder = seasonFolder;
|
||||||
oldSeries.QualityProfileId = qualityProfileId;
|
oldSeries.QualityProfileId = qualityProfileId;
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
using System.ComponentModel;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
|
|
||||||
namespace NzbDrone.Web.Models
|
|
||||||
{
|
|
||||||
public class AddExistingManualModel
|
|
||||||
{
|
|
||||||
public string Path { get; set; }
|
|
||||||
public string FolderName { get; set; }
|
|
||||||
|
|
||||||
[DisplayName("Quality Profile")]
|
|
||||||
public int QualityProfileId { get; set; }
|
|
||||||
|
|
||||||
public SelectList QualitySelectList { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
namespace NzbDrone.Web.Models
|
|
||||||
{
|
|
||||||
public class AddExistingSeriesModel
|
|
||||||
{
|
|
||||||
public bool IsWanted { get; set; }
|
|
||||||
public string Path { get; set; }
|
|
||||||
public string PathEncoded { get; set; }
|
|
||||||
public int TvDbId { get; set; }
|
|
||||||
public string TvDbName { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
13
NzbDrone.Web/Models/ExistingSeriesModel.cs
Normal file
13
NzbDrone.Web/Models/ExistingSeriesModel.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
|
||||||
|
namespace NzbDrone.Web.Models
|
||||||
|
{
|
||||||
|
public class ExistingSeriesModel
|
||||||
|
{
|
||||||
|
public SelectList Quality { get; set; }
|
||||||
|
|
||||||
|
public List<Tuple<string, string>> ExistingSeries { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -51,9 +51,9 @@
|
|||||||
<HintPath>..\Libraries\MVC3\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\Libraries\MVC3\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MvcMiniProfiler, Version=1.4.4195.37960, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MvcMiniProfiler, Version=1.6.0.0, Culture=neutral, PublicKeyToken=b44f9351044011a3, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\MiniProfiler.1.4\lib\MvcMiniProfiler.dll</HintPath>
|
<HintPath>..\packages\MiniProfiler.1.6\lib\MvcMiniProfiler.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Ninject, Version=2.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
<Reference Include="Ninject, Version=2.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
|
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
|
||||||
@ -156,8 +156,7 @@
|
|||||||
<Compile Include="Helpers\DescriptionExtension.cs" />
|
<Compile Include="Helpers\DescriptionExtension.cs" />
|
||||||
<Compile Include="Helpers\HtmlPrefixScopeExtensions.cs" />
|
<Compile Include="Helpers\HtmlPrefixScopeExtensions.cs" />
|
||||||
<Compile Include="Helpers\IsCurrentActionHelper.cs" />
|
<Compile Include="Helpers\IsCurrentActionHelper.cs" />
|
||||||
<Compile Include="Models\AddExistingManualModel.cs" />
|
<Compile Include="Models\ExistingSeriesModel.cs" />
|
||||||
<Compile Include="Models\AddExistingSeriesModel.cs" />
|
|
||||||
<Compile Include="Models\AddNewSeriesModel.cs" />
|
<Compile Include="Models\AddNewSeriesModel.cs" />
|
||||||
<Compile Include="Models\PendingProcessingModel.cs" />
|
<Compile Include="Models\PendingProcessingModel.cs" />
|
||||||
<Compile Include="Models\QualityTypeModel.cs" />
|
<Compile Include="Models\QualityTypeModel.cs" />
|
||||||
@ -251,6 +250,7 @@
|
|||||||
<Content Include="favicon.ico" />
|
<Content Include="favicon.ico" />
|
||||||
<Content Include="Global.asax" />
|
<Content Include="Global.asax" />
|
||||||
<Content Include="Scripts\AutoComplete.js" />
|
<Content Include="Scripts\AutoComplete.js" />
|
||||||
|
<Content Include="Scripts\Plugins\jquery.livequery.js" />
|
||||||
<Content Include="Scripts\settingsForm.js" />
|
<Content Include="Scripts\settingsForm.js" />
|
||||||
<Content Include="Scripts\Plugins\doTimeout.js" />
|
<Content Include="Scripts\Plugins\doTimeout.js" />
|
||||||
<Content Include="Scripts\episodeSearch.js" />
|
<Content Include="Scripts\episodeSearch.js" />
|
||||||
@ -261,7 +261,6 @@
|
|||||||
<Content Include="Scripts\Notification.js" />
|
<Content Include="Scripts\Notification.js" />
|
||||||
<Content Include="Views\AddSeries\Index.cshtml" />
|
<Content Include="Views\AddSeries\Index.cshtml" />
|
||||||
<Content Include="Views\AddSeries\AddNew.cshtml" />
|
<Content Include="Views\AddSeries\AddNew.cshtml" />
|
||||||
<Content Include="Views\AddSeries\AddSeriesItem.cshtml" />
|
|
||||||
<Content Include="Web.config">
|
<Content Include="Web.config">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
@ -325,7 +324,7 @@
|
|||||||
<Content Include="Views\Series\SingleSeason.cshtml" />
|
<Content Include="Views\Series\SingleSeason.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\AddSeries\AddExisting.cshtml" />
|
<Content Include="Views\AddSeries\ExistingSeries.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\System\PendingProcessing.cshtml" />
|
<Content Include="Views\System\PendingProcessing.cshtml" />
|
||||||
|
@ -1,13 +1,48 @@
|
|||||||
function bindFolderAutoComplete(selector) {
|
jQuery(document).ready(function () {
|
||||||
|
$.ajaxSetup({
|
||||||
|
cache: false
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.folderLookup').livequery(function () {
|
||||||
|
bindFolderAutoComplete(".folderLookup");
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.seriesLookup').livequery(function () {
|
||||||
|
bindSeriesAutoComplete(".seriesLookup");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function bindFolderAutoComplete(selector) {
|
||||||
|
|
||||||
|
$(selector).each(function (index, element) {
|
||||||
|
|
||||||
YUI().use("autocomplete", "autocomplete-highlighters", 'autocomplete-filters', function (Y) {
|
YUI().use("autocomplete", "autocomplete-highlighters", 'autocomplete-filters', function (Y) {
|
||||||
Y.one('body').addClass('yui3-skin-sam');
|
Y.one('body').addClass('yui3-skin-sam');
|
||||||
Y.one(selector).plug(Y.Plugin.AutoComplete, {
|
Y.one(element).plug(Y.Plugin.AutoComplete, {
|
||||||
|
|
||||||
|
|
||||||
resultHighlighter: 'startsWith',
|
resultHighlighter: 'startsWith',
|
||||||
resultFilters: 'phraseMatch',
|
resultFilters: 'phraseMatch',
|
||||||
source: '/Directory/GetDirectories/?q={query}'
|
source: '/Directory/GetDirectories/?q={query}'
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function bindSeriesAutoComplete(selector) {
|
||||||
|
|
||||||
|
$(selector).each(function (index, element) {
|
||||||
|
YUI().use("autocomplete", "autocomplete-highlighters", 'autocomplete-filters', function (Y) {
|
||||||
|
Y.one('body').addClass('yui3-skin-sam');
|
||||||
|
Y.one(element).plug(Y.Plugin.AutoComplete, {
|
||||||
|
resultHighlighter: 'startsWith',
|
||||||
|
resultFilters: 'phraseMatch',
|
||||||
|
resultTextLocator: 'Value',
|
||||||
|
minQueryLength: 3,
|
||||||
|
queryDelay: 500,
|
||||||
|
source: '/AddSeries/LookupSeries/?q={query}'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
250
NzbDrone.Web/Scripts/Plugins/jquery.livequery.js
Normal file
250
NzbDrone.Web/Scripts/Plugins/jquery.livequery.js
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
/*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
|
||||||
|
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||||
|
*
|
||||||
|
* Version: 1.0.3
|
||||||
|
* Requires jQuery 1.1.3+
|
||||||
|
* Docs: http://docs.jquery.com/Plugins/livequery
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function($) {
|
||||||
|
|
||||||
|
$.extend($.fn, {
|
||||||
|
livequery: function(type, fn, fn2) {
|
||||||
|
var self = this, q;
|
||||||
|
|
||||||
|
// Handle different call patterns
|
||||||
|
if ($.isFunction(type))
|
||||||
|
fn2 = fn, fn = type, type = undefined;
|
||||||
|
|
||||||
|
// See if Live Query already exists
|
||||||
|
$.each( $.livequery.queries, function(i, query) {
|
||||||
|
if ( self.selector == query.selector && self.context == query.context &&
|
||||||
|
type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) )
|
||||||
|
// Found the query, exit the each loop
|
||||||
|
return (q = query) && false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create new Live Query if it wasn't found
|
||||||
|
q = q || new $.livequery(this.selector, this.context, type, fn, fn2);
|
||||||
|
|
||||||
|
// Make sure it is running
|
||||||
|
q.stopped = false;
|
||||||
|
|
||||||
|
// Run it immediately for the first time
|
||||||
|
q.run();
|
||||||
|
|
||||||
|
// Contnue the chain
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
expire: function(type, fn, fn2) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
// Handle different call patterns
|
||||||
|
if ($.isFunction(type))
|
||||||
|
fn2 = fn, fn = type, type = undefined;
|
||||||
|
|
||||||
|
// Find the Live Query based on arguments and stop it
|
||||||
|
$.each( $.livequery.queries, function(i, query) {
|
||||||
|
if ( self.selector == query.selector && self.context == query.context &&
|
||||||
|
(!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped )
|
||||||
|
$.livequery.stop(query.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Continue the chain
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$.livequery = function(selector, context, type, fn, fn2) {
|
||||||
|
this.selector = selector;
|
||||||
|
this.context = context || document;
|
||||||
|
this.type = type;
|
||||||
|
this.fn = fn;
|
||||||
|
this.fn2 = fn2;
|
||||||
|
this.elements = [];
|
||||||
|
this.stopped = false;
|
||||||
|
|
||||||
|
// The id is the index of the Live Query in $.livequery.queries
|
||||||
|
this.id = $.livequery.queries.push(this)-1;
|
||||||
|
|
||||||
|
// Mark the functions for matching later on
|
||||||
|
fn.$lqguid = fn.$lqguid || $.livequery.guid++;
|
||||||
|
if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++;
|
||||||
|
|
||||||
|
// Return the Live Query
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.livequery.prototype = {
|
||||||
|
stop: function() {
|
||||||
|
var query = this;
|
||||||
|
|
||||||
|
if ( this.type )
|
||||||
|
// Unbind all bound events
|
||||||
|
this.elements.unbind(this.type, this.fn);
|
||||||
|
else if (this.fn2)
|
||||||
|
// Call the second function for all matched elements
|
||||||
|
this.elements.each(function(i, el) {
|
||||||
|
query.fn2.apply(el);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Clear out matched elements
|
||||||
|
this.elements = [];
|
||||||
|
|
||||||
|
// Stop the Live Query from running until restarted
|
||||||
|
this.stopped = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
run: function() {
|
||||||
|
// Short-circuit if stopped
|
||||||
|
if ( this.stopped ) return;
|
||||||
|
var query = this;
|
||||||
|
|
||||||
|
var oEls = this.elements,
|
||||||
|
els = $(this.selector, this.context),
|
||||||
|
nEls = els.not(oEls);
|
||||||
|
|
||||||
|
// Set elements to the latest set of matched elements
|
||||||
|
this.elements = els;
|
||||||
|
|
||||||
|
if (this.type) {
|
||||||
|
// Bind events to newly matched elements
|
||||||
|
nEls.bind(this.type, this.fn);
|
||||||
|
|
||||||
|
// Unbind events to elements no longer matched
|
||||||
|
if (oEls.length > 0)
|
||||||
|
$.each(oEls, function(i, el) {
|
||||||
|
if ( $.inArray(el, els) < 0 )
|
||||||
|
$.event.remove(el, query.type, query.fn);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Call the first function for newly matched elements
|
||||||
|
nEls.each(function() {
|
||||||
|
query.fn.apply(this);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Call the second function for elements no longer matched
|
||||||
|
if ( this.fn2 && oEls.length > 0 )
|
||||||
|
$.each(oEls, function(i, el) {
|
||||||
|
if ( $.inArray(el, els) < 0 )
|
||||||
|
query.fn2.apply(el);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$.extend($.livequery, {
|
||||||
|
guid: 0,
|
||||||
|
queries: [],
|
||||||
|
queue: [],
|
||||||
|
running: false,
|
||||||
|
timeout: null,
|
||||||
|
|
||||||
|
checkQueue: function() {
|
||||||
|
if ( $.livequery.running && $.livequery.queue.length ) {
|
||||||
|
var length = $.livequery.queue.length;
|
||||||
|
// Run each Live Query currently in the queue
|
||||||
|
while ( length-- )
|
||||||
|
$.livequery.queries[ $.livequery.queue.shift() ].run();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
pause: function() {
|
||||||
|
// Don't run anymore Live Queries until restarted
|
||||||
|
$.livequery.running = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
play: function() {
|
||||||
|
// Restart Live Queries
|
||||||
|
$.livequery.running = true;
|
||||||
|
// Request a run of the Live Queries
|
||||||
|
$.livequery.run();
|
||||||
|
},
|
||||||
|
|
||||||
|
registerPlugin: function() {
|
||||||
|
$.each( arguments, function(i,n) {
|
||||||
|
// Short-circuit if the method doesn't exist
|
||||||
|
if (!$.fn[n]) return;
|
||||||
|
|
||||||
|
// Save a reference to the original method
|
||||||
|
var old = $.fn[n];
|
||||||
|
|
||||||
|
// Create a new method
|
||||||
|
$.fn[n] = function() {
|
||||||
|
// Call the original method
|
||||||
|
var r = old.apply(this, arguments);
|
||||||
|
|
||||||
|
// Request a run of the Live Queries
|
||||||
|
$.livequery.run();
|
||||||
|
|
||||||
|
// Return the original methods result
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
run: function(id) {
|
||||||
|
if (id != undefined) {
|
||||||
|
// Put the particular Live Query in the queue if it doesn't already exist
|
||||||
|
if ( $.inArray(id, $.livequery.queue) < 0 )
|
||||||
|
$.livequery.queue.push( id );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
// Put each Live Query in the queue if it doesn't already exist
|
||||||
|
$.each( $.livequery.queries, function(id) {
|
||||||
|
if ( $.inArray(id, $.livequery.queue) < 0 )
|
||||||
|
$.livequery.queue.push( id );
|
||||||
|
});
|
||||||
|
|
||||||
|
// Clear timeout if it already exists
|
||||||
|
if ($.livequery.timeout) clearTimeout($.livequery.timeout);
|
||||||
|
// Create a timeout to check the queue and actually run the Live Queries
|
||||||
|
$.livequery.timeout = setTimeout($.livequery.checkQueue, 20);
|
||||||
|
},
|
||||||
|
|
||||||
|
stop: function(id) {
|
||||||
|
if (id != undefined)
|
||||||
|
// Stop are particular Live Query
|
||||||
|
$.livequery.queries[ id ].stop();
|
||||||
|
else
|
||||||
|
// Stop all Live Queries
|
||||||
|
$.each( $.livequery.queries, function(id) {
|
||||||
|
$.livequery.queries[ id ].stop();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Register core DOM manipulation methods
|
||||||
|
$.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove');
|
||||||
|
|
||||||
|
// Run Live Queries when the Document is ready
|
||||||
|
$(function() { $.livequery.play(); });
|
||||||
|
|
||||||
|
|
||||||
|
// Save a reference to the original init method
|
||||||
|
var init = $.prototype.init;
|
||||||
|
|
||||||
|
// Create a new init method that exposes two new properties: selector and context
|
||||||
|
$.prototype.init = function(a,c) {
|
||||||
|
// Call the original init and save the result
|
||||||
|
var r = init.apply(this, arguments);
|
||||||
|
|
||||||
|
// Copy over properties if they exist already
|
||||||
|
if (a && a.selector)
|
||||||
|
r.context = a.context, r.selector = a.selector;
|
||||||
|
|
||||||
|
// Set properties
|
||||||
|
if ( typeof a == 'string' )
|
||||||
|
r.context = c || document, r.selector = a;
|
||||||
|
|
||||||
|
// Return the result
|
||||||
|
return r;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Give the init function the jQuery prototype for later instantiation (needed after Rev 4091)
|
||||||
|
$.prototype.init.prototype = $.prototype;
|
||||||
|
|
||||||
|
})(jQuery);
|
@ -1,15 +0,0 @@
|
|||||||
@model IEnumerable<String>
|
|
||||||
|
|
||||||
@{
|
|
||||||
Layout = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@if (Model.Count() == 0)
|
|
||||||
{
|
|
||||||
@Html.DisplayText("No Series to Add");
|
|
||||||
}
|
|
||||||
|
|
||||||
@foreach (var path in Model)
|
|
||||||
{
|
|
||||||
Html.RenderAction("RenderPartial", "AddSeries", new {path});
|
|
||||||
}
|
|
@ -2,56 +2,44 @@
|
|||||||
@using NzbDrone.Web.Models
|
@using NzbDrone.Web.Models
|
||||||
@{ Layout = null; }
|
@{ Layout = null; }
|
||||||
<div>
|
<div>
|
||||||
@Html.Label("Root Directory")
|
|
||||||
@Html.DropDownList("rootDirList", new SelectList((IList)ViewData["RootDirs"]))
|
|
||||||
@Html.Label("Quality")
|
|
||||||
@Html.DropDownList("qualityList", new SelectList((IList)ViewData["QualityList"], "QualityProfileId", "Name"))
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div>
|
<div>
|
||||||
@{Html.Telerik().ComboBox()
|
<input id="newSeriesLookup" class="seriesLookup" type="text" style="width: 400px" />
|
||||||
.Name("seriesList_new")
|
</div>
|
||||||
.DataBinding(binding => binding.Ajax().Select("_textLookUp", "AddSeries").Delay(400))
|
<input id="newSeriesPath" class="folderLookup" type="text" style="width: 400px" />
|
||||||
.Filterable(f => f.FilterMode(AutoCompleteFilterMode.Contains))
|
@Html.DropDownList("qualityList", new SelectList((IList)ViewData["QualityList"], "QualityProfileId", "Name"), new { @class = "qualitySelector" })
|
||||||
.HighlightFirstMatch(true)
|
<button id="saveNewSeries">
|
||||||
.HtmlAttributes(new { style = "width: 300px;" })
|
|
||||||
.Render();}
|
|
||||||
@Html.Telerik().DropDownList().Name("qualityList_new").BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px", @class = "qualityDropbox" })
|
|
||||||
<button class="listButton" onclick="addNewSeries()">
|
|
||||||
Add</button>
|
Add</button>
|
||||||
</div>
|
</div>
|
||||||
@section Scripts{
|
<br />
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
var addNewSeriesUrl = '@Url.Action("AddNewSeries", "AddSeries")';
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
function addNewSeries() {
|
$('#newSeriesPath').watermark('Path for the new series...');
|
||||||
var seriesComboBox = $("#seriesList_new").data("tDropDownList");
|
$('#newSeriesLookup').watermark('Title of the series you want to add...');
|
||||||
var qualityComboBox = $("#qualityList_new").data("tDropDownList");
|
|
||||||
var path = $("input[name='selectedRootDir']:checked").val();
|
|
||||||
|
|
||||||
sendToServerNew(seriesComboBox.value(), path, seriesComboBox.text(), qualityComboBox.value());
|
$('#saveNewSeries').click(function () {
|
||||||
}
|
|
||||||
|
var addSeriesUrl = '@Url.Action("AddNewSeries", "AddSeries")';
|
||||||
|
var seriesTitle = $("#newSeriesLookup").val();
|
||||||
|
var qualityId = $("#qualityList").val();
|
||||||
|
var path = $('#newSeriesPath').val();
|
||||||
|
|
||||||
function sendToServerNew(id, rootPath, seriesName, quality) {
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: addNewSeriesUrl,
|
url: addSeriesUrl,
|
||||||
data: jQuery.param({ rootPath: rootPath, seriesName: seriesName, seriesId: id, qualityProfileId: quality }),
|
data: jQuery.param({ path: path, seriesName: seriesTitle, qualityProfileId: qualityId }),
|
||||||
error: function (req, status, error) {
|
error: function (req, status, error) {
|
||||||
alert("Sorry! We could not add " + seriesName + " at this time. " + error);
|
alert("Sorry! We could not add " + path + " at this time. " + error);
|
||||||
},
|
},
|
||||||
success: function (data, textStatus, jqXHR) {
|
success: function () {
|
||||||
//Clear the search box
|
$("#newSeriesLookup").val("");
|
||||||
$("#seriesList_new").data("tComboBox").text('');
|
$('#newSeriesPath').val("");
|
||||||
|
|
||||||
//Through up an alert if we failed to add the series
|
|
||||||
if (data != 'ok')
|
|
||||||
alert("Sorry! We could not add " + seriesName + ", does it already exist?");
|
|
||||||
|
|
||||||
else
|
|
||||||
closeAddNewSeries(); //Close the Window!
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
}
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
@using NzbDrone.Core.Repository.Quality
|
|
||||||
@model SelectList
|
|
||||||
<div style="padding:3px" id="div_@(ViewData["guid"])">
|
|
||||||
<fieldset>
|
|
||||||
<legend>@ViewData["path"].ToString()</legend>
|
|
||||||
<div>
|
|
||||||
@{Html.Telerik().ComboBox()
|
|
||||||
.Name("seriesList_" + ViewData["guid"])
|
|
||||||
.BindTo(Model)
|
|
||||||
.DataBinding(binding => binding.Ajax().Select("_textLookUp", "AddSeries").Delay(400))
|
|
||||||
.Filterable(f => f.FilterMode(AutoCompleteFilterMode.Contains))
|
|
||||||
.HighlightFirstMatch(true)
|
|
||||||
.HtmlAttributes(new { style = "width: 300px;" })
|
|
||||||
.Render();}
|
|
||||||
@Html.Telerik().DropDownList().Name("qualityList_" + ViewData["guid"]).BindTo((SelectList)ViewData["quality"]).HtmlAttributes(new { style = "width: 100px", @class = "qualityDropbox" })
|
|
||||||
<button class="listButton" onclick="addSeries('@ViewData["guid"]','@ViewData["javaPath"].ToString()' )">
|
|
||||||
Add</button>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
98
NzbDrone.Web/Views/AddSeries/ExistingSeries.cshtml
Normal file
98
NzbDrone.Web/Views/AddSeries/ExistingSeries.cshtml
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
@using System.Collections
|
||||||
|
@using NzbDrone.Web.Models
|
||||||
|
@using System.Web.Mvc.Html
|
||||||
|
@model ExistingSeriesModel
|
||||||
|
@{
|
||||||
|
Layout = null;
|
||||||
|
}
|
||||||
|
@if (Model.ExistingSeries.Count == 0)
|
||||||
|
{
|
||||||
|
<h3 style="color: tomato">
|
||||||
|
No series available. Try adding a new Root Folder.
|
||||||
|
</h3>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<h3>
|
||||||
|
Series Ready to be added.
|
||||||
|
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector masterQualitySelector" })
|
||||||
|
</h3>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
}
|
||||||
|
@foreach (var series in Model.ExistingSeries)
|
||||||
|
{
|
||||||
|
<span class="existingSeries">
|
||||||
|
<div>
|
||||||
|
<span class="seriesPathValue">
|
||||||
|
@Html.Label(series.Item1)
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input class="seriesLookup" type="text" style="width: 400px" value="@series.Item2" />
|
||||||
|
@Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector" })
|
||||||
|
<button class="addExistingButton">
|
||||||
|
Add</button>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.existingSeries
|
||||||
|
{
|
||||||
|
border-color: #f2f2f2;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
margin: 0px 10px 20px 0px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.masterQualitySelector
|
||||||
|
{
|
||||||
|
left: 202px;
|
||||||
|
position: relative;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
$(".masterQualitySelector").change(function () {
|
||||||
|
|
||||||
|
var profileId = $(this).val();
|
||||||
|
$("#existingSeries").find(".qualitySelector").each(function () {
|
||||||
|
$(this).val(profileId);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".addExistingButton").click(function () {
|
||||||
|
|
||||||
|
var root = $(this).parents(".existingSeries");
|
||||||
|
|
||||||
|
var addSeriesUrl = '@Url.Action("AddExistingSeries", "AddSeries")';
|
||||||
|
var title = $(this).siblings(".seriesLookup").val();
|
||||||
|
var qualityId = $(this).siblings(".qualitySelector").val();
|
||||||
|
|
||||||
|
var path = root.find(".seriesPathValue Label").text();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
url: addSeriesUrl,
|
||||||
|
data: jQuery.param({ path: path, seriesName: title, qualityProfileId: qualityId }),
|
||||||
|
error: function (req, status, error) {
|
||||||
|
alert("Sorry! We could not add " + path + " at this time. " + error);
|
||||||
|
},
|
||||||
|
success: function () {
|
||||||
|
root.hide('highlight', 'fast');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
@ -1,90 +1,18 @@
|
|||||||
@model List<RootDir>
|
@using NzbDrone.Core.Repository
|
||||||
@using NzbDrone.Core.Repository
|
|
||||||
@section HeaderContent
|
|
||||||
{
|
|
||||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/3.3.0/build/yui/yui-min.js"></script>
|
|
||||||
}
|
|
||||||
@section TitleContent{
|
@section TitleContent{
|
||||||
Add Series
|
Add Series
|
||||||
}
|
}
|
||||||
@section MainContent{
|
@section MainContent{
|
||||||
<div id="addNewWindow" class="dialog">
|
<h2>
|
||||||
|
Add New Series</h2>
|
||||||
@{ Html.RenderAction("AddNew", "AddSeries"); }
|
@{ Html.RenderAction("AddNew", "AddSeries"); }
|
||||||
</div>
|
<h2>
|
||||||
|
Add Series Already on Disk</h2>
|
||||||
|
<h3>
|
||||||
|
Manage Root Folders
|
||||||
|
</h3>
|
||||||
@{Html.RenderAction("RootDir");}
|
@{Html.RenderAction("RootDir");}
|
||||||
<div id="existingSeries">
|
<div id="existingSeries">
|
||||||
<div style="padding-bottom: 10px; padding-top: 15px;">
|
@{ Html.RenderAction("ExistingSeries", "AddSeries"); }
|
||||||
<button onclick="openAddNewSeries(); return false;" class="listButton" style="margin-left: 5px">
|
|
||||||
Add New</button>
|
|
||||||
@Html.Telerik().DropDownList().Name("masterDropbox").BindTo((SelectList)ViewData["qualities"]).HtmlAttributes(
|
|
||||||
new { style = "width: 100px; margin-left:224px;" }).ClientEvents(events => events.OnChange("masterChanged"))
|
|
||||||
</div>
|
|
||||||
@{ Html.RenderAction("AddExisting", "AddSeries"); }
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@section Scripts
|
|
||||||
{
|
|
||||||
<script type="text/javascript">
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
$("#addNewWindow").dialog({
|
|
||||||
title: 'add new series',
|
|
||||||
height: '500',
|
|
||||||
width: '700',
|
|
||||||
modal: true
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function openAddNewSeries() {
|
|
||||||
var window = $('#Window').data('tWindow');
|
|
||||||
window.center().open();
|
|
||||||
window.refresh();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeAddNewSeries() {
|
|
||||||
var window = $('#Window').data("tWindow");
|
|
||||||
window.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
function masterChanged() {
|
|
||||||
var masterQuality = $('#masterDropbox').data("tDropDownList").value();
|
|
||||||
|
|
||||||
var qualityDropbox = $(".qualityDropbox");
|
|
||||||
|
|
||||||
qualityDropbox.each(function () {
|
|
||||||
var child = $(this).children("[id^='qualityList']");
|
|
||||||
var comboBox = child.data("tDropDownList");
|
|
||||||
comboBox.value(masterQuality);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var addSeriesUrl = '@Url.Action("AddSeries", "AddSeries")';
|
|
||||||
|
|
||||||
function addSeries(guid, path) {
|
|
||||||
var seriesComboBox = $("#seriesList_" + guid).data("tComboBox");
|
|
||||||
var qualityComboBox = $("#qualityList_" + guid).data("tDropDownList");
|
|
||||||
sendToServer(seriesComboBox.value(), path, qualityComboBox.value());
|
|
||||||
$("#div_" + guid).hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
function sendToServer(id, path, quality) {
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: addSeriesUrl,
|
|
||||||
data: jQuery.param({ path: path, seriesId: id, qualityProfileId: quality }),
|
|
||||||
error: function (req, status, error) {
|
|
||||||
alert("Sorry! We could not add " + path + " at this time. " + error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function reloadExistingSeries() {
|
|
||||||
$('#reloadAjax').show();
|
|
||||||
$('#existingSeries').load('@Url.Action("AddExisting", "AddSeries")',
|
|
||||||
function (responseText, textStatus, XMLHttpRequest) {
|
|
||||||
$('#reloadAjax').hide();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
}
|
|
||||||
|
@ -1,20 +1,12 @@
|
|||||||
<span>
|
<span>
|
||||||
<input id="rootDirInput" type="text" style="width: 400px" />
|
<input id="rootDirInput" class="folderLookup" type="text" style="width: 400px" />
|
||||||
<button id="saveDir">
|
<button id="saveDir">
|
||||||
Add</button>
|
Add</button>
|
||||||
</span>
|
</span><span id="rootDirs">
|
||||||
<span id="rootDirs">
|
|
||||||
@{Html.RenderAction("RootList");}
|
@{Html.RenderAction("RootList");}
|
||||||
</span>
|
</span>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
$.ajaxSetup({
|
|
||||||
cache: false
|
|
||||||
});
|
|
||||||
|
|
||||||
bindFolderAutoComplete('#rootDirInput');
|
|
||||||
|
|
||||||
$('#rootDirInput').watermark('Start typing to add new root folder...');
|
$('#rootDirInput').watermark('Start typing to add new root folder...');
|
||||||
|
|
||||||
$('#rootDirs .actionButton img').live('click',
|
$('#rootDirs .actionButton img').live('click',
|
||||||
@ -29,11 +21,12 @@
|
|||||||
|
|
||||||
function saveRootDir() {
|
function saveRootDir() {
|
||||||
var path = $("#rootDirInput").val();
|
var path = $("#rootDirInput").val();
|
||||||
|
if (path) {
|
||||||
$.post('@Url.Action("SaveRootDir", "AddSeries")', { Path: path }, function () {
|
$.post('@Url.Action("SaveRootDir", "AddSeries")', { Path: path }, function () {
|
||||||
refreshRoot();
|
refreshRoot();
|
||||||
$("#rootDirInput").val('');
|
$("#rootDirInput").val('');
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -41,6 +34,7 @@
|
|||||||
$.get('@Url.Action("RootList", "AddSeries")', function (data) {
|
$.get('@Url.Action("RootList", "AddSeries")', function (data) {
|
||||||
$('#rootDirs').html(data);
|
$('#rootDirs').html(data);
|
||||||
});
|
});
|
||||||
|
reloadExistingSeries();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,42 +1,35 @@
|
|||||||
@using NzbDrone.Web.Helpers;
|
@using NzbDrone.Web.Helpers;
|
||||||
@using NzbDrone.Web.Models;
|
@using NzbDrone.Web.Models;
|
||||||
@model NzbDrone.Web.Models.SeriesModel
|
@model NzbDrone.Web.Models.SeriesModel
|
||||||
|
|
||||||
@{
|
@{
|
||||||
Layout = null;
|
Layout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div style="width: 435px; margin: 10px;">
|
<div class=".settingsForm">
|
||||||
|
|
||||||
@Html.HiddenFor(m => m.SeriesId)
|
@Html.HiddenFor(m => m.SeriesId)
|
||||||
|
<label class="labelClass">@Html.LabelFor(m => m.Monitored)
|
||||||
<div class="edit-group">
|
<span class="small">@Html.DescriptionFor(m => m.Monitored)</span>
|
||||||
<div class="config-title">@Html.LabelFor(m => m.Path)</div>
|
</label>
|
||||||
<div class="config-value">@Html.TextBoxFor(m => m.Path, new { style = "width: 300" })</div>
|
@Html.CheckBoxFor(m => m.Monitored, new { @class = "inputClass checkClass" })
|
||||||
</div>
|
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolder)
|
||||||
|
<span class="small">@Html.DescriptionFor(m => m.SeasonFolder)</span>
|
||||||
<div class="edit-group">
|
</label>
|
||||||
<div class="config-title">@Html.LabelFor(m => m.Monitored)</div>
|
@Html.CheckBoxFor(m => m.SeasonFolder, new { @class = "inputClass checkClass" })
|
||||||
<div class="config-value">@Html.CheckBoxFor(m => m.Monitored, new { style = "margin-right:287px" })</div>
|
<label class="labelClass">@Html.LabelFor(m => m.QualityProfileId)
|
||||||
</div>
|
<span class="small">@Html.DescriptionFor(m => m.QualityProfileId)</span>
|
||||||
|
</label>
|
||||||
<div class="edit-group">
|
@Html.DropDownListFor(m => m.QualityProfileId, (SelectList)ViewData["SelectList"], new { @class = "inputClass" })
|
||||||
<div class="config-title">@Html.LabelFor(m => m.SeasonFolder)</div>
|
|
||||||
<div class="config-value">@Html.CheckBoxFor(m => m.SeasonFolder, new { style = "margin-right:287px" })</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="edit-group">
|
|
||||||
<b>@Html.LabelFor(m => m.QualityProfileId)</b>
|
|
||||||
@Html.DropDownListFor(model => model.QualityProfileId, (SelectList)ViewData["SelectList"], new { style = "margin-left:40px" })
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="seasonEditorSection">
|
<div id="seasonEditorSection">
|
||||||
<div style="font-weight: bold; padding-right: 15px; padding-bottom: 5px;">
|
<div style="font-weight: bold; padding-right: 15px; padding-bottom: 5px;">
|
||||||
@Html.LabelFor(m => m.SeasonEditor)
|
@Html.LabelFor(m => m.SeasonEditor)
|
||||||
<span id="seasonEditorLoader"><img src="../../../Content/Images/ajax-loader.gif" width="14px" height="14px" style="margin-bottom: -2px;"/></span>
|
<span id="seasonEditorLoader">
|
||||||
|
<img src="../../../Content/Images/ajax-loader.gif" width="14px" height="14px" style="margin-bottom: -2px;" /></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="season-editor"></div>
|
<div id="season-editor">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span id="ajaxSaveWheel" style="display: none; float: right; padding-right: 368px; padding-top: 1.5px;"><img src="../../../Content/Images/ajax-loader.gif" width="20px" height="20px"/></span>
|
</div>
|
||||||
|
<span id="ajaxSaveWheel" style="display: none; float: right; padding-right: 368px;
|
||||||
|
padding-top: 1.5px;">
|
||||||
|
<img src="../../../Content/Images/ajax-loader.gif" width="20px" height="20px" /></span>
|
@ -2,7 +2,7 @@
|
|||||||
@model NzbDrone.Web.Models.NotificationSettingsModel
|
@model NzbDrone.Web.Models.NotificationSettingsModel
|
||||||
|
|
||||||
@section HeaderContent{
|
@section HeaderContent{
|
||||||
<link rel="stylesheet" type="text/css" href="../../Content/Settings.css" />
|
<link rel="stylesheet" type="text/css" href="/Content/Settings.css" />
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.notifier
|
.notifier
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<label class="labelClass">@Html.LabelFor(m => m.SabDropDirectory)
|
<label class="labelClass">@Html.LabelFor(m => m.SabDropDirectory)
|
||||||
<span class="small">@Html.DescriptionFor(m => m.SabDropDirectory)</span>
|
<span class="small">@Html.DescriptionFor(m => m.SabDropDirectory)</span>
|
||||||
</label>
|
</label>
|
||||||
@Html.TextBoxFor(m => m.SabDropDirectory, new { @class = "inputClass" })
|
@Html.TextBoxFor(m => m.SabDropDirectory, new { @class = "inputClass folderLookup" })
|
||||||
|
|
||||||
<button type="submit" id="save_button" >Save</button><img src="../../Content/Images/ajax-loader.gif" alt="Loader" id="saveAjax"/>
|
<button type="submit" id="save_button" >Save</button><img src="../../Content/Images/ajax-loader.gif" alt="Loader" id="saveAjax"/>
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,10 @@
|
|||||||
<link type="text/css" rel="stylesheet" href="/Content/overrides.css" />
|
<link type="text/css" rel="stylesheet" href="/Content/overrides.css" />
|
||||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
|
||||||
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/yui/3.3.0/build/yui/yui-min.js"></script>
|
||||||
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>
|
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js"></script>
|
||||||
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/MicrosoftMvcAjax.js"></script>
|
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/MicrosoftMvcAjax.js"></script>
|
||||||
|
<script type="text/javascript" src="/Scripts/Plugins/jquery.livequery.js"></script>
|
||||||
<script type="text/javascript" src="/Scripts/Plugins/jquery.form.js"></script>
|
<script type="text/javascript" src="/Scripts/Plugins/jquery.form.js"></script>
|
||||||
<script type="text/javascript" src="/Scripts/Plugins/jquery.jgrowl.js"></script>
|
<script type="text/javascript" src="/Scripts/Plugins/jquery.jgrowl.js"></script>
|
||||||
<script type="text/javascript" src="/Scripts/Plugins/jquery-tgc-countdown-1.0.js"></script>
|
<script type="text/javascript" src="/Scripts/Plugins/jquery-tgc-countdown-1.0.js"></script>
|
||||||
|
@ -8,5 +8,5 @@
|
|||||||
<package id="jQuery.Validation" version="1.8.0.1" />
|
<package id="jQuery.Validation" version="1.8.0.1" />
|
||||||
<package id="jQuery" version="1.6.1" />
|
<package id="jQuery" version="1.6.1" />
|
||||||
<package id="SqlServerCompact" version="4.0.8482.1" />
|
<package id="SqlServerCompact" version="4.0.8482.1" />
|
||||||
<package id="MiniProfiler" version="1.4" />
|
<package id="MiniProfiler" version="1.6" />
|
||||||
</packages>
|
</packages>
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Net;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using Exceptioneer.WindowsFormsClient;
|
using Exceptioneer.WindowsFormsClient;
|
||||||
@ -38,7 +39,18 @@ private static void Main()
|
|||||||
Attach();
|
Attach();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (Environment.UserInteractive)
|
if (!Environment.UserInteractive)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
new WebClient().DownloadString(IISController.AppUrl);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Logger.ErrorException("Failed to load home page.", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
BIN
packages/MiniProfiler.1.4/MiniProfiler.1.4.nupkg
vendored
BIN
packages/MiniProfiler.1.4/MiniProfiler.1.4.nupkg
vendored
Binary file not shown.
BIN
packages/MiniProfiler.1.4/lib/MvcMiniProfiler.pdb
vendored
BIN
packages/MiniProfiler.1.4/lib/MvcMiniProfiler.pdb
vendored
Binary file not shown.
BIN
packages/MiniProfiler.1.6/MiniProfiler.1.6.nupkg
vendored
Normal file
BIN
packages/MiniProfiler.1.6/MiniProfiler.1.6.nupkg
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
packages/MiniProfiler.1.6/lib/MvcMiniProfiler.pdb
vendored
Normal file
BIN
packages/MiniProfiler.1.6/lib/MvcMiniProfiler.pdb
vendored
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user