this should fix some more tests.

pull/2/head
Keivan Beigi 12 years ago
parent 85fd4248a6
commit d722a8357b

@ -19,7 +19,7 @@ namespace NzbDrone.Core.Test.ProviderTests.SearchTests
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public TestSearch(ISeriesService seriesService, IEpisodeService episodeService, DownloadProvider downloadProvider,
IndexerService indexerService, SceneMappingProvider sceneMappingProvider,
IIndexerService indexerService, SceneMappingProvider sceneMappingProvider,
AllowedDownloadSpecification allowedDownloadSpecification, SearchHistoryProvider searchHistoryProvider,ISeriesRepository seriesRepository)
: base(seriesService, seriesRepository, episodeService, downloadProvider, indexerService, sceneMappingProvider,
allowedDownloadSpecification, searchHistoryProvider)

@ -47,7 +47,7 @@ namespace NzbDrone.Core.Jobs
if (options != null)
{
Series series = _seriesRepository.Get(options.SeriesId);
Series series = _seriesRepository.Get((int)options.SeriesId);
if (series != null && !String.IsNullOrEmpty(series.BannerUrl))
{

@ -41,7 +41,7 @@ namespace NzbDrone.Core.Jobs
if (options == null || options.EpisodeId <= 0)
throw new ArgumentNullException(options);
Episode episode = _episodeService.GetEpisode(options.EpisodeId);
Episode episode = _episodeService.GetEpisode((int)options.EpisodeId);
notification.CurrentMessage = String.Format("Starting Conversion for {0}", episode);
var outputFile = _handbrakeProvider.ConvertFile(episode, notification);

@ -41,7 +41,7 @@ namespace NzbDrone.Core.Jobs
if (options.SeriesId == 0)
throw new ArgumentNullException("options.SeriesId");
DeleteSeries(notification, options.SeriesId, options.DeleteFiles);
DeleteSeries(notification, (int)options.SeriesId, (bool)options.DeleteFiles);
}
private void DeleteSeries(ProgressNotification notification, int seriesId, bool deleteFiles)

@ -55,7 +55,7 @@ namespace NzbDrone.Core.Jobs
}
else
{
seriesToScan = new List<Series>() { _seriesRepository.Get(options.SeriesId) };
seriesToScan = new List<Series>() { _seriesRepository.Get((int)options.SeriesId) };
}
foreach (var series in seriesToScan)

@ -49,7 +49,7 @@ namespace NzbDrone.Core.Jobs
if (options == null || options.EpisodeId <= 0)
throw new ArgumentException("options");
Episode episode = _episodeService.GetEpisode(options.EpisodeId);
Episode episode = _episodeService.GetEpisode((int)options.EpisodeId);
if (episode == null)
{

@ -21,7 +21,7 @@ namespace NzbDrone.Core.Jobs
public RenameSeasonJob(MediaFileProvider mediaFileProvider, DiskScanProvider diskScanProvider,
ExternalNotificationProvider externalNotificationProvider, ISeriesService seriesService,
MetadataProvider metadataProvider,ISeriesRepository seriesRepository)
MetadataProvider metadataProvider, ISeriesRepository seriesRepository)
{
_mediaFileProvider = mediaFileProvider;
_diskScanProvider = diskScanProvider;
@ -49,12 +49,12 @@ namespace NzbDrone.Core.Jobs
if (options.SeasonNumber < 0)
throw new ArgumentException("options.SeasonNumber");
var series = _seriesRepository.Get(options.SeriesId);
var series = _seriesRepository.Get((int)options.SeriesId);
notification.CurrentMessage = String.Format("Renaming episodes for {0} Season {1}", series.Title, options.SeasonNumber);
logger.Debug("Getting episodes from database for series: {0} and season: {1}", options.SeriesId, options.SeasonNumber);
IList<EpisodeFile> episodeFiles = _mediaFileProvider.GetSeasonFiles(options.SeriesId, options.SeasonNumber);
IList<EpisodeFile> episodeFiles = _mediaFileProvider.GetSeasonFiles((int)options.SeriesId, (int)options.SeasonNumber);
if (episodeFiles == null || !episodeFiles.Any())
{
@ -85,7 +85,7 @@ namespace NzbDrone.Core.Jobs
}
}
if(!oldEpisodeFiles.Any())
if (!oldEpisodeFiles.Any())
{
logger.Trace("No episodes were renamed for: {0} Season {1}, no changes were made", series.Title,
options.SeasonNumber);

@ -53,7 +53,7 @@ namespace NzbDrone.Core.Jobs
else
{
seriesToRename = new List<Series>{ _seriesRepository.Get(options.SeriesId) };
seriesToRename = new List<Series>{ _seriesRepository.Get((int)options.SeriesId) };
}
foreach(var series in seriesToRename)

@ -57,7 +57,7 @@ namespace NzbDrone.Core.Jobs
// return;
Logger.Debug("Getting episodes from database for series: {0} and season: {1}", options.SeriesId, options.SeasonNumber);
List<Episode> episodes = _episodeService.GetEpisodesBySeason(options.SeriesId, options.SeasonNumber);
IList<Episode> episodes = _episodeService.GetEpisodesBySeason((int)options.SeriesId, (int)options.SeasonNumber);
if (episodes == null || episodes.Count == 0)
{

@ -38,11 +38,11 @@ namespace NzbDrone.Core.Jobs
throw new ArgumentException("options.SeriesId");
logger.Debug("Getting seasons from database for series: {0}", options.SeriesId);
IList<int> seasons = _seasonRepository.GetSeasonBySeries(options.SeriesId);
IList<int> seasons = _seasonRepository.GetSeasonNumbers((int)options.SeriesId);
foreach (var season in seasons.Where(s => s > 0))
{
if (!_seasonRepository.IsIgnored(options.SeriesId, season))
if (!_seasonRepository.IsIgnored((int)options.SeriesId, season))
{
_seasonSearchJob.Start(notification, new { SeriesId = options.SeriesId, SeasonNumber = season });
}

@ -58,7 +58,10 @@ namespace NzbDrone.Core.Jobs
}
else
{
seriesToUpdate = new List<Series> { _seriesRepository.Get(options.SeriesId) };
seriesToUpdate = new List<Series>
{
_seriesRepository.Get((int)options.SeriesId)
};
}
//Update any Daily Series in the DB with the IsDaily flag
@ -74,11 +77,11 @@ namespace NzbDrone.Core.Jobs
notification.CurrentMessage = "Update completed for " + series.Title;
}
catch(Exception ex)
catch (Exception ex)
{
Logger.ErrorException("Failed to update episode info for series: " + series.Title, ex);
}
}
}
}

@ -46,9 +46,9 @@ namespace NzbDrone.Core.Jobs
else
{
_logger.Trace("Starting XEM Update for series: {0}", options.SeriesId);
_xemProvider.UpdateMappings(options.SeriesId);
_xemProvider.UpdateMappings((int)options.SeriesId);
}
_logger.Trace("XEM Update complete");
}
}

Loading…
Cancel
Save