mirror of https://github.com/Radarr/Radarr
Added additional logging to metadata creation
This commit is contained in:
parent
38eeda8c37
commit
510d538c86
|
@ -123,7 +123,12 @@ namespace NzbDrone.Core.Providers
|
||||||
public virtual void CreateForEpisodeFiles(List<EpisodeFile> episodeFiles)
|
public virtual void CreateForEpisodeFiles(List<EpisodeFile> episodeFiles)
|
||||||
{
|
{
|
||||||
if (episodeFiles == null || !episodeFiles.Any())
|
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);
|
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))
|
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);
|
provider.CreateForEpisodeFile(episodeFile, tvDbSeries);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue