diff --git a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj index 540e2f486..5c0d764d7 100644 --- a/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj +++ b/NzbDrone.Core.Test/NzbDrone.Core.Test.csproj @@ -146,7 +146,7 @@ - + diff --git a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/AllowedDownloadSpecificationFixture.cs b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/AllowedDownloadSpecificationFixture.cs index 0feeeeca4..a5e79c2a1 100644 --- a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/AllowedDownloadSpecificationFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/AllowedDownloadSpecificationFixture.cs @@ -53,7 +53,7 @@ public void Setup() .Setup(c => c.IsSatisfiedBy(It.IsAny())) .Returns(true); - Mocker.GetMock() + Mocker.GetMock() .Setup(c => c.IsSatisfiedBy(It.IsAny())) .Returns(true); } @@ -93,9 +93,9 @@ private void WithOverRetention() .Returns(false); } - private void WithAiredBeforeCutoff() + private void WithAiredBeforeCustomStartDateCutoff() { - Mocker.GetMock() + Mocker.GetMock() .Setup(c => c.IsSatisfiedBy(It.IsAny())) .Returns(false); } @@ -144,8 +144,8 @@ public void should_not_be_allowed_if_report_is_over_retention() [Test] public void should_not_be_allowed_if_episode_aired_before_cutoff() { - WithAiredBeforeCutoff(); - spec.IsSatisfiedBy(parseResult).Should().Be(ReportRejectionType.EpisodeAiredBeforeCutoff); + WithAiredBeforeCustomStartDateCutoff(); + spec.IsSatisfiedBy(parseResult).Should().Be(ReportRejectionType.AiredAfterCustomStartDate); } [Test] diff --git a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/EpisodeAiredAfterCutoffSpecificationFixture.cs b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/CustomStartDateSpecificationFixture.cs similarity index 74% rename from NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/EpisodeAiredAfterCutoffSpecificationFixture.cs rename to NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/CustomStartDateSpecificationFixture.cs index 2041fba02..6e5b5d0da 100644 --- a/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/EpisodeAiredAfterCutoffSpecificationFixture.cs +++ b/NzbDrone.Core.Test/ProviderTests/DecisionEngineTests/CustomStartDateSpecificationFixture.cs @@ -17,9 +17,9 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests { [TestFixture] // ReSharper disable InconsistentNaming - public class EpisodeAiredAfterCutoffSpecificationFixture : CoreTest + public class CustomStartDateSpecificationFixture : CoreTest { - private EpisodeAiredAfterCutoffSpecification episodeAiredAfterCutoffSpecification; + private CustomStartDateSpecification _customStartDateSpecification; private EpisodeParseResult parseResultMulti; private EpisodeParseResult parseResultSingle; @@ -30,11 +30,11 @@ public class EpisodeAiredAfterCutoffSpecificationFixture : CoreTest [SetUp] public void Setup() { - episodeAiredAfterCutoffSpecification = Mocker.Resolve(); + _customStartDateSpecification = Mocker.Resolve(); fakeSeries = Builder.CreateNew() .With(c => c.Monitored = true) - .With(c => c.DownloadEpisodesAiredAfter = null) + .With(c => c.CustomStartDate = null) .Build(); parseResultMulti = new EpisodeParseResult @@ -75,38 +75,38 @@ private void WithSecondEpisodeYear() private void WithAiredAfterYesterday() { - fakeSeries.DownloadEpisodesAiredAfter = DateTime.Today.AddDays(-1); + fakeSeries.CustomStartDate = DateTime.Today.AddDays(-1); } private void WithAiredAfterLastWeek() { - fakeSeries.DownloadEpisodesAiredAfter = DateTime.Today.AddDays(-7); + fakeSeries.CustomStartDate = DateTime.Today.AddDays(-7); } [Test] public void should_return_true_when_downloadEpisodesAiredAfter_is_null_for_single_episode() { - episodeAiredAfterCutoffSpecification.IsSatisfiedBy(parseResultSingle).Should().BeTrue(); + _customStartDateSpecification.IsSatisfiedBy(parseResultSingle).Should().BeTrue(); } [Test] public void should_return_true_when_downloadEpisodesAiredAfter_is_null_for_multiple_episodes() { - episodeAiredAfterCutoffSpecification.IsSatisfiedBy(parseResultMulti).Should().BeTrue(); + _customStartDateSpecification.IsSatisfiedBy(parseResultMulti).Should().BeTrue(); } [Test] public void should_return_true_if_both_episodes_air_after_cutoff() { WithAiredAfterLastWeek(); - episodeAiredAfterCutoffSpecification.IsSatisfiedBy(parseResultMulti).Should().BeTrue(); + _customStartDateSpecification.IsSatisfiedBy(parseResultMulti).Should().BeTrue(); } [Test] public void should_return_true_if_episode_airs_after_cutoff() { WithAiredAfterLastWeek(); - episodeAiredAfterCutoffSpecification.IsSatisfiedBy(parseResultSingle).Should().BeTrue(); + _customStartDateSpecification.IsSatisfiedBy(parseResultSingle).Should().BeTrue(); } [Test] @@ -114,7 +114,7 @@ public void should_return_true_if_first_episode_aired_after_cutoff() { WithAiredAfterLastWeek(); WithSecondEpisodeYear(); - episodeAiredAfterCutoffSpecification.IsSatisfiedBy(parseResultMulti).Should().BeTrue(); + _customStartDateSpecification.IsSatisfiedBy(parseResultMulti).Should().BeTrue(); } [Test] @@ -122,7 +122,7 @@ public void should_return_true_if_second_episode_aired_after_cutoff() { WithAiredAfterLastWeek(); WithFirstEpisodeLastYear(); - episodeAiredAfterCutoffSpecification.IsSatisfiedBy(parseResultMulti).Should().BeTrue(); + _customStartDateSpecification.IsSatisfiedBy(parseResultMulti).Should().BeTrue(); } [Test] @@ -131,7 +131,7 @@ public void should_return_false_if_both_episodes_aired_before_cutoff() WithAiredAfterLastWeek(); WithFirstEpisodeLastYear(); WithSecondEpisodeYear(); - episodeAiredAfterCutoffSpecification.IsSatisfiedBy(parseResultMulti).Should().BeFalse(); + _customStartDateSpecification.IsSatisfiedBy(parseResultMulti).Should().BeFalse(); } [Test] @@ -139,7 +139,7 @@ public void should_return_false_if_episode_aired_before_cutoff() { WithAiredAfterLastWeek(); WithFirstEpisodeLastYear(); - episodeAiredAfterCutoffSpecification.IsSatisfiedBy(parseResultSingle).Should().BeFalse(); + _customStartDateSpecification.IsSatisfiedBy(parseResultSingle).Should().BeFalse(); } } } \ No newline at end of file diff --git a/NzbDrone.Core/Datastore/Migrations/Migration20120919.cs b/NzbDrone.Core/Datastore/Migrations/Migration20120919.cs new file mode 100644 index 000000000..5790ef024 --- /dev/null +++ b/NzbDrone.Core/Datastore/Migrations/Migration20120919.cs @@ -0,0 +1,21 @@ +using System; +using System.Data; +using Migrator.Framework; +using NzbDrone.Common; + +namespace NzbDrone.Core.Datastore.Migrations +{ + + [Migration(20120919)] + public class Migration20120919 : NzbDroneMigration + { + protected override void MainDbUpgrade() + { + Database.AddColumn("Series", new Column("CustomStartDate", DbType.DateTime, ColumnProperty.Null)); + + Database.ExecuteNonQuery("UPDATE Series SET CustomStartDate = DownloadEpisodesAiredAfter"); + + Database.RemoveColumn("Series", "DownloadEpisodesAiredAfter"); + } + } +} \ No newline at end of file diff --git a/NzbDrone.Core/Model/ReportRejectionType.cs b/NzbDrone.Core/Model/ReportRejectionType.cs index ad695a577..9e2b6900d 100644 --- a/NzbDrone.Core/Model/ReportRejectionType.cs +++ b/NzbDrone.Core/Model/ReportRejectionType.cs @@ -18,6 +18,6 @@ public enum ReportRejectionType Skipped = 11, Failure = 12, ReleaseGroupNotWanted = 13, - EpisodeAiredBeforeCutoff = 14 + AiredAfterCustomStartDate = 14 } } diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 4b6c2cdf7..8cc7feb5b 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -227,6 +227,7 @@ + @@ -292,7 +293,7 @@ - + diff --git a/NzbDrone.Core/Providers/DecisionEngine/AllowedDownloadSpecification.cs b/NzbDrone.Core/Providers/DecisionEngine/AllowedDownloadSpecification.cs index 3ef8408aa..5e29fce41 100644 --- a/NzbDrone.Core/Providers/DecisionEngine/AllowedDownloadSpecification.cs +++ b/NzbDrone.Core/Providers/DecisionEngine/AllowedDownloadSpecification.cs @@ -14,14 +14,14 @@ public class AllowedDownloadSpecification private readonly AlreadyInQueueSpecification _alreadyInQueueSpecification; private readonly RetentionSpecification _retentionSpecification; private readonly AllowedReleaseGroupSpecification _allowedReleaseGroupSpecification; - private readonly EpisodeAiredAfterCutoffSpecification _episodeAiredAfterCutoffSpecification; + private readonly CustomStartDateSpecification _customStartDateSpecification; private static readonly Logger logger = LogManager.GetCurrentClassLogger(); [Inject] public AllowedDownloadSpecification(QualityAllowedByProfileSpecification qualityAllowedByProfileSpecification, UpgradeDiskSpecification upgradeDiskSpecification, AcceptableSizeSpecification acceptableSizeSpecification, AlreadyInQueueSpecification alreadyInQueueSpecification, RetentionSpecification retentionSpecification, - AllowedReleaseGroupSpecification allowedReleaseGroupSpecification, EpisodeAiredAfterCutoffSpecification episodeAiredAfterCutoffSpecification) + AllowedReleaseGroupSpecification allowedReleaseGroupSpecification, CustomStartDateSpecification customStartDateSpecification) { _qualityAllowedByProfileSpecification = qualityAllowedByProfileSpecification; _upgradeDiskSpecification = upgradeDiskSpecification; @@ -29,7 +29,7 @@ public AllowedDownloadSpecification(QualityAllowedByProfileSpecification quality _alreadyInQueueSpecification = alreadyInQueueSpecification; _retentionSpecification = retentionSpecification; _allowedReleaseGroupSpecification = allowedReleaseGroupSpecification; - _episodeAiredAfterCutoffSpecification = episodeAiredAfterCutoffSpecification; + _customStartDateSpecification = customStartDateSpecification; } public AllowedDownloadSpecification() @@ -39,7 +39,7 @@ public AllowedDownloadSpecification() public virtual ReportRejectionType IsSatisfiedBy(EpisodeParseResult subject) { if (!_qualityAllowedByProfileSpecification.IsSatisfiedBy(subject)) return ReportRejectionType.QualityNotWanted; - if (!_episodeAiredAfterCutoffSpecification.IsSatisfiedBy(subject)) return ReportRejectionType.EpisodeAiredBeforeCutoff; + if (!_customStartDateSpecification.IsSatisfiedBy(subject)) return ReportRejectionType.AiredAfterCustomStartDate; if (!_upgradeDiskSpecification.IsSatisfiedBy(subject)) return ReportRejectionType.ExistingQualityIsEqualOrBetter; if (!_retentionSpecification.IsSatisfiedBy(subject)) return ReportRejectionType.Retention; if (!_acceptableSizeSpecification.IsSatisfiedBy(subject)) return ReportRejectionType.Size; diff --git a/NzbDrone.Core/Providers/DecisionEngine/EpisodeAiredAfterCutoffSpecification.cs b/NzbDrone.Core/Providers/DecisionEngine/CustomStartDateSpecification.cs similarity index 74% rename from NzbDrone.Core/Providers/DecisionEngine/EpisodeAiredAfterCutoffSpecification.cs rename to NzbDrone.Core/Providers/DecisionEngine/CustomStartDateSpecification.cs index f6778816f..53db72ff1 100644 --- a/NzbDrone.Core/Providers/DecisionEngine/EpisodeAiredAfterCutoffSpecification.cs +++ b/NzbDrone.Core/Providers/DecisionEngine/CustomStartDateSpecification.cs @@ -5,25 +5,25 @@ namespace NzbDrone.Core.Providers.DecisionEngine { - public class EpisodeAiredAfterCutoffSpecification + public class CustomStartDateSpecification { private readonly EpisodeProvider _episodeProvider; private static readonly Logger logger = LogManager.GetCurrentClassLogger(); [Inject] - public EpisodeAiredAfterCutoffSpecification(EpisodeProvider episodeProvider) + public CustomStartDateSpecification(EpisodeProvider episodeProvider) { _episodeProvider = episodeProvider; } - public EpisodeAiredAfterCutoffSpecification() + public CustomStartDateSpecification() { } public virtual bool IsSatisfiedBy(EpisodeParseResult subject) { - if (!subject.Series.DownloadEpisodesAiredAfter.HasValue) + if (!subject.Series.CustomStartDate.HasValue) { logger.Debug("{0} does not restrict downloads before date.", subject.Series.Title); return true; @@ -31,13 +31,13 @@ public virtual bool IsSatisfiedBy(EpisodeParseResult subject) var episodes = _episodeProvider.GetEpisodesByParseResult(subject); - if (episodes.Any(episode => episode.AirDate > subject.Series.DownloadEpisodesAiredAfter.Value)) + if (episodes.Any(episode => episode.AirDate > subject.Series.CustomStartDate.Value)) { logger.Debug("One or more episodes aired after cutoff, downloading."); return true; } - logger.Debug("Episodes aired before cutoff date: {0}", subject.Series.DownloadEpisodesAiredAfter); + logger.Debug("Episodes aired before cutoff date: {0}", subject.Series.CustomStartDate); return false; } } diff --git a/NzbDrone.Core/Providers/SeriesProvider.cs b/NzbDrone.Core/Providers/SeriesProvider.cs index 08e129def..ecbded829 100644 --- a/NzbDrone.Core/Providers/SeriesProvider.cs +++ b/NzbDrone.Core/Providers/SeriesProvider.cs @@ -132,7 +132,7 @@ public virtual void AddSeries(string title, string path, int tvDbSeriesId, int q repoSeries.BacklogSetting = BacklogSettingType.Inherit; if (airedAfter.HasValue) - repoSeries.DownloadEpisodesAiredAfter = airedAfter; + repoSeries.CustomStartDate = airedAfter; _database.Insert(repoSeries); } @@ -232,7 +232,7 @@ public virtual void UpdateFromSeriesEditor(IList editedSeries) series.SeasonFolder = edited.SeasonFolder; series.BacklogSetting = edited.BacklogSetting; series.Path = edited.Path; - series.DownloadEpisodesAiredAfter = edited.DownloadEpisodesAiredAfter; + series.CustomStartDate = edited.CustomStartDate; } _database.UpdateMany(allSeries); diff --git a/NzbDrone.Core/Repository/Series.cs b/NzbDrone.Core/Repository/Series.cs index acb0c25b8..70d19cead 100644 --- a/NzbDrone.Core/Repository/Series.cs +++ b/NzbDrone.Core/Repository/Series.cs @@ -48,7 +48,7 @@ public class Series public string Network { get; set; } - public DateTime? DownloadEpisodesAiredAfter { get; set; } + public DateTime? CustomStartDate { get; set; } /// /// Gets or sets a value indicating whether this is hidden. diff --git a/NzbDrone.Web/Content/SeriesEditor.css b/NzbDrone.Web/Content/SeriesEditor.css index f41e13fcf..0bd01b82a 100644 --- a/NzbDrone.Web/Content/SeriesEditor.css +++ b/NzbDrone.Web/Content/SeriesEditor.css @@ -37,7 +37,7 @@ th .footer-control-quality { width: 120px; } -td .aired-after { +td .start-date { width: 80px; } @@ -45,7 +45,7 @@ th .footer-control-boolean { width: 90px; } -th .footer-control-aired-after { +th .footer-control-start-date { width: 80px; } diff --git a/NzbDrone.Web/Controllers/AddSeriesController.cs b/NzbDrone.Web/Controllers/AddSeriesController.cs index 9d8d93b36..cdb50d6ad 100644 --- a/NzbDrone.Web/Controllers/AddSeriesController.cs +++ b/NzbDrone.Web/Controllers/AddSeriesController.cs @@ -110,7 +110,7 @@ public ActionResult ExistingSeries() } [HttpPost] - public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int qualityProfileId, string airedAfter) + public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int qualityProfileId, string startDate) { if (string.IsNullOrWhiteSpace(path) || String.Equals(path,"null",StringComparison.InvariantCultureIgnoreCase)) return JsonNotificationResult.Error("Couldn't add " + seriesName, "You need a valid root folder"); @@ -121,20 +121,20 @@ public JsonResult AddNewSeries(string path, string seriesName, int seriesId, int //Use the created folder name when adding the series path = _diskProvider.CreateDirectory(path); - return AddExistingSeries(path, seriesName, seriesId, qualityProfileId, airedAfter); + return AddExistingSeries(path, seriesName, seriesId, qualityProfileId, startDate); } [HttpPost] [JsonErrorFilter] - public JsonResult AddExistingSeries(string path, string seriesName, int seriesId, int qualityProfileId, string airedAfter) + public JsonResult AddExistingSeries(string path, string seriesName, int seriesId, int qualityProfileId, string startDate) { if (seriesId == 0 || String.IsNullOrWhiteSpace(seriesName)) return JsonNotificationResult.Error("Add Existing series failed.", "Invalid Series information"); DateTime? date = null; - if (!String.IsNullOrWhiteSpace(airedAfter)) - date = DateTime.Parse(airedAfter, null, DateTimeStyles.RoundtripKind); + if (!String.IsNullOrWhiteSpace(startDate)) + date = DateTime.Parse(startDate, null, DateTimeStyles.RoundtripKind); _seriesProvider.AddSeries(seriesName,path, seriesId, qualityProfileId, date); _jobProvider.QueueJob(typeof(ImportNewSeriesJob)); diff --git a/NzbDrone.Web/Controllers/SeriesController.cs b/NzbDrone.Web/Controllers/SeriesController.cs index 8691827ad..d82d7898f 100644 --- a/NzbDrone.Web/Controllers/SeriesController.cs +++ b/NzbDrone.Web/Controllers/SeriesController.cs @@ -73,8 +73,8 @@ public EmptyResult Edit(SeriesModel seriesModel) series.Path = seriesModel.Path; series.BacklogSetting = (BacklogSettingType)seriesModel.BacklogSetting; - if (!String.IsNullOrWhiteSpace(seriesModel.DownloadEpisodesAiredAfter)) - series.DownloadEpisodesAiredAfter = DateTime.Parse(seriesModel.DownloadEpisodesAiredAfter, null, DateTimeStyles.RoundtripKind); + if (!String.IsNullOrWhiteSpace(seriesModel.CustomStartDate)) + series.CustomStartDate = DateTime.Parse(seriesModel.CustomStartDate, null, DateTimeStyles.RoundtripKind); _seriesProvider.UpdateSeries(series); @@ -190,8 +190,8 @@ public JsonResult Editor(List series) SeasonFolder = s.SeasonFolder, BacklogSetting = (BacklogSettingType)s.BacklogSetting, Path = s.Path, - DownloadEpisodesAiredAfter = String.IsNullOrWhiteSpace(s.DownloadEpisodesAiredAfter) ? (DateTime?)null - : DateTime.Parse(s.DownloadEpisodesAiredAfter, null, DateTimeStyles.RoundtripKind) + CustomStartDate = String.IsNullOrWhiteSpace(s.CustomStartDate) ? (DateTime?)null + : DateTime.Parse(s.CustomStartDate, null, DateTimeStyles.RoundtripKind) } ).ToList()); return JsonNotificationResult.Info("Series Mass Edit Saved"); @@ -220,7 +220,7 @@ private List GetSeriesModels(IList seriesInDb) NextAiring = s.NextAiring == null ? String.Empty : s.NextAiring.Value.ToBestDateString(), NextAiringSorter = s.NextAiring == null ? "12/31/9999" : s.NextAiring.Value.ToString("MM/dd/yyyy"), AirTime = s.AirTimes, - DownloadEpisodesAiredAfter = s.DownloadEpisodesAiredAfter.HasValue ? s.DownloadEpisodesAiredAfter.Value.ToString("yyyy-MM-dd") : String.Empty + CustomStartDate = s.CustomStartDate.HasValue ? s.CustomStartDate.Value.ToString("yyyy-MM-dd") : String.Empty }).ToList(); return series; diff --git a/NzbDrone.Web/Models/SeriesModel.cs b/NzbDrone.Web/Models/SeriesModel.cs index b61204248..a99617155 100644 --- a/NzbDrone.Web/Models/SeriesModel.cs +++ b/NzbDrone.Web/Models/SeriesModel.cs @@ -53,8 +53,8 @@ public class SeriesModel [Description("Should NzbDrone search for missing episodes every 30 days?")] public int BacklogSetting { get; set; } - [DisplayName("Download Episodes Aired After")] - [Description("Should NzbDrone only download episodes a certain date?")] - public string DownloadEpisodesAiredAfter { get; set; } + [DisplayName("Custom Start Date")] + [Description("Should NzbDrone only download episodes after your preferred start date?")] + public string CustomStartDate { get; set; } } } \ No newline at end of file diff --git a/NzbDrone.Web/Scripts/NzbDrone/addSeries.js b/NzbDrone.Web/Scripts/NzbDrone/addSeries.js index 219d87eef..6f1c8fa71 100644 --- a/NzbDrone.Web/Scripts/NzbDrone/addSeries.js +++ b/NzbDrone.Web/Scripts/NzbDrone/addSeries.js @@ -25,7 +25,7 @@ $(".addExistingButton").live('click', function () { var title = $(this).siblings(".seriesLookup").val(); var seriesId = $(this).siblings(".seriesId").val(); var qualityId = $(this).siblings(".qualitySelector").val(); - var date = $(this).siblings('.aired-after').val(); + var date = $(this).siblings('.start-date').val(); var path = root.find(".seriesPathValue Label").text(); @@ -43,7 +43,7 @@ $(".addExistingButton").live('click', function () { $.ajax({ type: "POST", url: addSeriesUrl, - data: jQuery.param({ path: path, seriesName: title, seriesId: seriesId, qualityProfileId: qualityId, airedAfter: date }), + data: jQuery.param({ path: path, seriesName: title, seriesId: seriesId, qualityProfileId: qualityId, startDate: date }), error: function (req, status, error) { $(button).removeAttr('disabled'); alert("Sorry! We could not add " + path + " at this time. " + error); @@ -67,10 +67,10 @@ function reloadExistingSeries() { }); } -$(".aired-after-master").live('change', function () { +$(".start-date-master").live('change', function () { var date = $(this).val(); - $("#existingSeries").find(".aired-after").each(function () { + $("#existingSeries").find(".start-date").each(function () { $(this).val(date); }); }); @@ -129,12 +129,12 @@ $('#saveNewSeries').live('click', function () { var seriesId = $("#newSeriesId").val(); var qualityId = $("#qualityList").val(); var path = $('#newSeriesPath').val(); - var date = $('#newAiredAfter').val(); + var date = $('#newStartDate').val(); $.ajax({ type: "POST", url: addNewSeriesUrl, - data: jQuery.param({ path: path, seriesName: seriesTitle, seriesId: seriesId, qualityProfileId: qualityId, airedAfter: date }), + data: jQuery.param({ path: path, seriesName: seriesTitle, seriesId: seriesId, qualityProfileId: qualityId, startDate: date }), error: function (req, status, error) { $('#saveNewSeries').removeAttr('disabled'); alert("Sorry! We could not add " + path + " at this time. " + error); @@ -142,7 +142,7 @@ $('#saveNewSeries').live('click', function () { success: function () { $('#saveNewSeries').removeAttr('disabled'); $("#newSeriesLookup").val(''); - $('#newAiredAfter').val(''); + $('#newStartDate').val(''); } }); }); diff --git a/NzbDrone.Web/Views/AddSeries/AddNew.cshtml b/NzbDrone.Web/Views/AddSeries/AddNew.cshtml index 5c46dfeaa..9b86fb816 100644 --- a/NzbDrone.Web/Views/AddSeries/AddNew.cshtml +++ b/NzbDrone.Web/Views/AddSeries/AddNew.cshtml @@ -7,7 +7,7 @@ @Html.DropDownList("newSeriesPath", new SelectList((IList)ViewData["RootDirs"]), new { style = "width: 406px; margin-left: 0px;" }) @Html.DropDownList("qualityList", (SelectList)ViewData["QualityProfiles"], new { @class = "qualitySelector" }) - @Html.TextBox("newAiredAfter", "", new { type = "date", @class = "jQuery-datepicker aired-after", title = "Only download episodes that aired after the choosen date" }) + @Html.TextBox("newStartDate", "", new { type = "date", @class = "jQuery-datepicker start-date", placeholder = "Custom Start Date", title = "Only download episodes that aired after the specified date" }) \ No newline at end of file diff --git a/NzbDrone.Web/Views/AddSeries/ExistingSeries.cshtml b/NzbDrone.Web/Views/AddSeries/ExistingSeries.cshtml index fe0a51a40..9f84db2e2 100644 --- a/NzbDrone.Web/Views/AddSeries/ExistingSeries.cshtml +++ b/NzbDrone.Web/Views/AddSeries/ExistingSeries.cshtml @@ -23,7 +23,7 @@ else { @Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector masterQualitySelector" }) - @Html.TextBox(Guid.NewGuid().ToString(), "", new { type="date", @class = "jQuery-datepicker aired-after-master", title = "Skip episodes that aired before the choosen date" }) + @Html.TextBox(Guid.NewGuid().ToString(), "", new { type="date", @class = "jQuery-datepicker start-date-master", placeholder = "Custom Start Date", title = "Only download episodes that aired after the specified date" }) foreach (var series in Model.ExistingSeries) { @@ -35,7 +35,7 @@ else @Html.Hidden("seriesId", series.Item3, new { @class = "seriesId" }) @Html.DropDownList(Guid.NewGuid().ToString(), Model.Quality, new { @class = "qualitySelector" }) - @Html.TextBox(Guid.NewGuid().ToString(), "", new { type="date", @class = "jQuery-datepicker aired-after", title = "Only download episodes that aired after the choosen date" }) + @Html.TextBox(Guid.NewGuid().ToString(), "", new { type="date", @class = "jQuery-datepicker start-date", placeholder = "Custom Start Date", title = "Only download episodes that aired after the specified date" }) diff --git a/NzbDrone.Web/Views/AddSeries/Index.cshtml b/NzbDrone.Web/Views/AddSeries/Index.cshtml index 14746e52a..d629009b6 100644 --- a/NzbDrone.Web/Views/AddSeries/Index.cshtml +++ b/NzbDrone.Web/Views/AddSeries/Index.cshtml @@ -20,7 +20,7 @@ position: relative; } - .aired-after-master { + .start-date-master { left: 430px; position: relative; } @@ -51,7 +51,7 @@ text-decoration: underline; } - input[type=date].aired-after { + input[type=date].start-date { margin-left: 10px; } diff --git a/NzbDrone.Web/Views/Series/Edit.cshtml b/NzbDrone.Web/Views/Series/Edit.cshtml index a2bf391e2..c7770a995 100644 --- a/NzbDrone.Web/Views/Series/Edit.cshtml +++ b/NzbDrone.Web/Views/Series/Edit.cshtml @@ -37,9 +37,9 @@ @Html.DropDownListFor(m => m.BacklogSetting, (SelectList)ViewData["BacklogSettingSelectList"], new { @class = "inputClass" }) -