Added job for updating XEM mappings

XEM mappings will also be updated when a new series is imported
This commit is contained in:
Mark McDowall 2012-10-17 21:15:42 -07:00
commit 5cd9438939
4 changed files with 109 additions and 32 deletions

View file

@ -22,6 +22,7 @@ namespace NzbDrone.Core.Jobs
private readonly DiskScanJob _diskScanJob;
private readonly BannerDownloadJob _bannerDownloadJob;
private readonly SeasonProvider _seasonProvider;
private readonly XemUpdateJob _xemUpdateJob;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
@ -30,7 +31,8 @@ namespace NzbDrone.Core.Jobs
[Inject]
public ImportNewSeriesJob(SeriesProvider seriesProvider, EpisodeProvider episodeProvider,
MediaFileProvider mediaFileProvider, UpdateInfoJob updateInfoJob,
DiskScanJob diskScanJob, BannerDownloadJob bannerDownloadJob,SeasonProvider seasonProvider)
DiskScanJob diskScanJob, BannerDownloadJob bannerDownloadJob,
SeasonProvider seasonProvider, XemUpdateJob xemUpdateJob)
{
_seriesProvider = seriesProvider;
_episodeProvider = episodeProvider;
@ -39,6 +41,7 @@ namespace NzbDrone.Core.Jobs
_diskScanJob = diskScanJob;
_bannerDownloadJob = bannerDownloadJob;
_seasonProvider = seasonProvider;
_xemUpdateJob = xemUpdateJob;
}
public string Name
@ -81,6 +84,9 @@ namespace NzbDrone.Core.Jobs
//Download the banner for the new series
_bannerDownloadJob.Start(notification, updatedSeries.SeriesId, 0);
//Get Scene Numbering if applicable
_xemUpdateJob.Start(notification, updatedSeries.SeriesId, 0);
notification.CurrentMessage = String.Format("{0} was successfully imported", updatedSeries.Title);
}