diff --git a/NzbDrone.Web/Controllers/CommandController.cs b/NzbDrone.Web/Controllers/CommandController.cs index 147a896f1f..3c7ebc30e4 100644 --- a/NzbDrone.Web/Controllers/CommandController.cs +++ b/NzbDrone.Web/Controllers/CommandController.cs @@ -32,19 +32,19 @@ public CommandController(JobProvider jobProvider, SabProvider sabProvider, 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 @@ public JsonResult ForceRefresh(int seriesId) _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 @@ public JsonResult GetSabnzbdCategories(string host, int port, string apiKey, str 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 c956f1aa78..e3330c33f2 100644 --- a/NzbDrone.Web/Controllers/EpisodeController.cs +++ b/NzbDrone.Web/Controllers/EpisodeController.cs @@ -17,31 +17,34 @@ public EpisodeController(JobProvider jobProvider) 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 3120e04b5b..eb836f3f63 100644 --- a/NzbDrone.Web/Controllers/HistoryController.cs +++ b/NzbDrone.Web/Controllers/HistoryController.cs @@ -79,7 +79,7 @@ public JsonResult Redownload(int historyId, int episodeId) //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 8f89ee8616..00cb3f90dd 100644 --- a/NzbDrone.Web/Models/JsonNotificationResult.cs +++ b/NzbDrone.Web/Models/JsonNotificationResult.cs @@ -34,6 +34,11 @@ public static JsonResult Oops(string text) 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) {