Added additional logging to metadata creation

pull/6/head
Mark McDowall 12 years ago
parent 38eeda8c37
commit 510d538c86

@ -123,7 +123,12 @@ namespace NzbDrone.Core.Providers
public virtual void CreateForEpisodeFiles(List<EpisodeFile> episodeFiles)
{
if (episodeFiles == null || !episodeFiles.Any())
return;
{
Logger.Warn("No episode files, no metadata will be created.");
throw new ArgumentException("EpsiodeFiles must not be null or empty", "episodeFiles");
}
Logger.Trace("Creating metadata for {0} files.", episodeFiles.Count);
var tvDbSeries = _tvDbProvider.GetSeries(episodeFiles.First().SeriesId, true, true);
@ -131,6 +136,7 @@ namespace NzbDrone.Core.Providers
{
foreach (var provider in _metadataProviders.Where(i => GetSettings(i.GetType()).Enable))
{
Logger.Trace("Creating {0} metadata for {1}", provider.Name, episodeFile.EpisodeFileId);
provider.CreateForEpisodeFile(episodeFile, tvDbSeries);
}
}

Loading…
Cancel
Save