1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-27 01:57:21 +00:00

Fixed series info not saving properly when refreshing info

This commit is contained in:
Mark McDowall 2013-02-28 08:33:55 -08:00
parent 295a624311
commit 4e1c04b186

View file

@ -49,18 +49,18 @@ public TimeSpan DefaultInterval
public virtual void Start(ProgressNotification notification, dynamic options)
{
IList<Series> seriesToUpdate;
IList<Series> ListOfSeriesToUpdate;
if (options == null || options.SeriesId == 0)
{
if (_configService.IgnoreArticlesWhenSortingSeries)
seriesToUpdate = _seriesRepository.All().OrderBy(o => o.Title.IgnoreArticles()).ToList();
ListOfSeriesToUpdate = _seriesRepository.All().OrderBy(o => o.Title.IgnoreArticles()).ToList();
else
seriesToUpdate = _seriesRepository.All().OrderBy(o => o.Title).ToList();
ListOfSeriesToUpdate = _seriesRepository.All().OrderBy(o => o.Title).ToList();
}
else
{
seriesToUpdate = new List<Series>
ListOfSeriesToUpdate = new List<Series>
{
_seriesRepository.Get((int)options.SeriesId)
};
@ -69,12 +69,14 @@ public virtual void Start(ProgressNotification notification, dynamic options)
//Update any Daily Series in the DB with the IsDaily flag
_referenceDataProvider.UpdateDailySeries();
foreach (var series in seriesToUpdate)
foreach (var seriesToUpdate in ListOfSeriesToUpdate)
{
var series = seriesToUpdate;
try
{
notification.CurrentMessage = "Updating " + series.Title;
_seriesService.UpdateSeriesInfo(series.Id);
series = _seriesService.UpdateSeriesInfo(series.Id);
_episodeService.RefreshEpisodeInfo(series);
notification.CurrentMessage = "Update completed for " + series.Title;
}