1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-11-06 09:19:38 +02:00

Updated task notification UI. Last message will stay on screen for an extra 3 seconds if there are no new messages.

This commit is contained in:
kay.one
2011-04-23 21:06:34 -07:00
parent 53a7b92a64
commit 0d139f9c21
7 changed files with 77 additions and 58 deletions

View File

@@ -52,8 +52,8 @@ namespace NzbDrone.Core.Providers.Jobs
updatedSeries.Title);
_episodeProvider.RefreshEpisodeInfo(updatedSeries.SeriesId);
notification.CurrentStatus = String.Format("Scanning series folder {0}",
updatedSeries.Path);
notification.CurrentStatus = String.Format("Scanning disk for {0} files",
updatedSeries.Title);
_mediaFileProvider.Scan(_seriesProvider.GetSeries(updatedSeries.SeriesId));
}

View File

@@ -44,6 +44,7 @@ namespace NzbDrone.Core.Providers.Jobs
_seriesProvider.UpdateSeriesInfo(series.SeriesId);
notification.CurrentStatus = "Updating episode info for " + series.Title;
_episodeProvider.RefreshEpisodeInfo(series.SeriesId);
notification.CurrentStatus = "Update completed for " + series.Title;
}
}
}

View File

@@ -24,9 +24,17 @@ namespace NzbDrone.Core.Providers
{
get
{
return
new List<ProgressNotification>(
_progressNotification.Values.Where(p => p.Status == ProgressNotificationStatus.InProgress));
var activeNotification = _progressNotification.Values.Where(p => p.Status == ProgressNotificationStatus.InProgress).ToList();
if (activeNotification.Count == 0)
{
//Get notifications that were recently done
activeNotification = _progressNotification.Values.Where(p => p.CompletedTime >= DateTime.Now.AddSeconds(-3)).OrderByDescending(c => c.CompletedTime).ToList();
}
return activeNotification.ToList();
}
}