mirror of https://github.com/Radarr/Radarr
Fixed series info not saving properly when refreshing info
This commit is contained in:
parent
295a624311
commit
4e1c04b186
|
@ -49,18 +49,18 @@ namespace NzbDrone.Core.Jobs
|
||||||
|
|
||||||
public virtual void Start(ProgressNotification notification, dynamic options)
|
public virtual void Start(ProgressNotification notification, dynamic options)
|
||||||
{
|
{
|
||||||
IList<Series> seriesToUpdate;
|
IList<Series> ListOfSeriesToUpdate;
|
||||||
if (options == null || options.SeriesId == 0)
|
if (options == null || options.SeriesId == 0)
|
||||||
{
|
{
|
||||||
if (_configService.IgnoreArticlesWhenSortingSeries)
|
if (_configService.IgnoreArticlesWhenSortingSeries)
|
||||||
seriesToUpdate = _seriesRepository.All().OrderBy(o => o.Title.IgnoreArticles()).ToList();
|
ListOfSeriesToUpdate = _seriesRepository.All().OrderBy(o => o.Title.IgnoreArticles()).ToList();
|
||||||
|
|
||||||
else
|
else
|
||||||
seriesToUpdate = _seriesRepository.All().OrderBy(o => o.Title).ToList();
|
ListOfSeriesToUpdate = _seriesRepository.All().OrderBy(o => o.Title).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
seriesToUpdate = new List<Series>
|
ListOfSeriesToUpdate = new List<Series>
|
||||||
{
|
{
|
||||||
_seriesRepository.Get((int)options.SeriesId)
|
_seriesRepository.Get((int)options.SeriesId)
|
||||||
};
|
};
|
||||||
|
@ -69,12 +69,14 @@ namespace NzbDrone.Core.Jobs
|
||||||
//Update any Daily Series in the DB with the IsDaily flag
|
//Update any Daily Series in the DB with the IsDaily flag
|
||||||
_referenceDataProvider.UpdateDailySeries();
|
_referenceDataProvider.UpdateDailySeries();
|
||||||
|
|
||||||
foreach (var series in seriesToUpdate)
|
foreach (var seriesToUpdate in ListOfSeriesToUpdate)
|
||||||
{
|
{
|
||||||
|
var series = seriesToUpdate;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
notification.CurrentMessage = "Updating " + series.Title;
|
notification.CurrentMessage = "Updating " + series.Title;
|
||||||
_seriesService.UpdateSeriesInfo(series.Id);
|
series = _seriesService.UpdateSeriesInfo(series.Id);
|
||||||
_episodeService.RefreshEpisodeInfo(series);
|
_episodeService.RefreshEpisodeInfo(series);
|
||||||
notification.CurrentMessage = "Update completed for " + series.Title;
|
notification.CurrentMessage = "Update completed for " + series.Title;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue