diff --git a/NzbDrone.Web/Controllers/CommandController.cs b/NzbDrone.Web/Controllers/CommandController.cs index 147a896f1..3c7ebc30e 100644 --- a/NzbDrone.Web/Controllers/CommandController.cs +++ b/NzbDrone.Web/Controllers/CommandController.cs @@ -32,19 +32,19 @@ namespace NzbDrone.Web.Controllers public JsonResult RssSync() { _jobProvider.QueueJob(typeof(RssSyncJob)); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("RSS sync"); } public JsonResult BacklogSearch() { _jobProvider.QueueJob(typeof(BacklogSearchJob)); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("Backlog search"); } public JsonResult RecentBacklogSearch() { _jobProvider.QueueJob(typeof(RecentBacklogSearchJob)); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("Recent backlog search"); } public JsonResult ForceRefresh(int seriesId) @@ -52,7 +52,7 @@ namespace NzbDrone.Web.Controllers _jobProvider.QueueJob(typeof(UpdateInfoJob), seriesId); _jobProvider.QueueJob(typeof(DiskScanJob), seriesId); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("Episode update/Disk scan"); } [HttpPost] @@ -66,7 +66,7 @@ namespace NzbDrone.Web.Controllers public JsonResult SendTestEmail(string server, int port, bool ssl, string username, string password, string fromAddress, string toAddresses) { if (_smtpProvider.SendTestEmail(server, port, ssl, username, password, fromAddress, toAddresses)) - JsonNotificationResult.Info("Successfull", "Test email sent."); + JsonNotificationResult.Info("Successful", "Test email sent."); return JsonNotificationResult.Oops("Couldn't send Email, please check your settings"); } diff --git a/NzbDrone.Web/Controllers/EpisodeController.cs b/NzbDrone.Web/Controllers/EpisodeController.cs index c956f1aa7..e3330c33f 100644 --- a/NzbDrone.Web/Controllers/EpisodeController.cs +++ b/NzbDrone.Web/Controllers/EpisodeController.cs @@ -17,31 +17,34 @@ namespace NzbDrone.Web.Controllers public JsonResult Search(int episodeId) { _jobProvider.QueueJob(typeof(EpisodeSearchJob), episodeId); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("Episode search"); } public JsonResult SearchSeason(int seriesId, int seasonNumber) { _jobProvider.QueueJob(typeof(SeasonSearchJob), seriesId, seasonNumber); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("Season search"); + } public JsonResult BacklogSeries(int seriesId) { _jobProvider.QueueJob(typeof(SeriesSearchJob), seriesId); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("Series Backlog"); + } public JsonResult RenameSeason(int seriesId, int seasonNumber) { _jobProvider.QueueJob(typeof(RenameSeasonJob), seriesId, seasonNumber); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("Season rename"); + } public JsonResult RenameEpisodes(int seriesId) { _jobProvider.QueueJob(typeof(RenameSeriesJob), seriesId); - return JsonNotificationResult.Info("Queued"); + return JsonNotificationResult.Queued("Series rename"); } } } \ No newline at end of file diff --git a/NzbDrone.Web/Controllers/HistoryController.cs b/NzbDrone.Web/Controllers/HistoryController.cs index 3120e04b5..eb836f3f6 100644 --- a/NzbDrone.Web/Controllers/HistoryController.cs +++ b/NzbDrone.Web/Controllers/HistoryController.cs @@ -79,7 +79,7 @@ namespace NzbDrone.Web.Controllers //Queue a job to download the replacement episode _jobProvider.QueueJob(typeof(EpisodeSearchJob), episodeId); - return JsonNotificationResult.Info("Episode Redownload Started"); + return JsonNotificationResult.Queued("Episode search"); } } } \ No newline at end of file diff --git a/NzbDrone.Web/Models/JsonNotificationResult.cs b/NzbDrone.Web/Models/JsonNotificationResult.cs index 8f89ee861..00cb3f90d 100644 --- a/NzbDrone.Web/Models/JsonNotificationResult.cs +++ b/NzbDrone.Web/Models/JsonNotificationResult.cs @@ -34,6 +34,11 @@ namespace NzbDrone.Web.Models return GetJsonResult(NotificationType.Error, "Oops!", text); } + public static JsonResult Queued(string task) + { + return GetJsonResult(NotificationType.Info, "Added to queue", string.Format("{0} will start soon.", task.Trim())); + } + public static JsonResult GetJsonResult(NotificationType notificationType, string title, string text) {