reduce error logging

This commit is contained in:
Luke Pulverenti 2017-01-03 00:15:16 -05:00
parent c0ddeaab77
commit 4c08d26ad4

View File

@ -93,6 +93,12 @@ namespace MediaBrowser.Providers.TV
return; return;
} }
// Check this in order to avoid logging an exception due to directory not existing
if (!_fileSystem.DirectoryExists(seriesDataPath))
{
return;
}
var episodeFiles = _fileSystem.GetFilePaths(seriesDataPath) var episodeFiles = _fileSystem.GetFilePaths(seriesDataPath)
.Where(i => string.Equals(Path.GetExtension(i), ".xml", StringComparison.OrdinalIgnoreCase)) .Where(i => string.Equals(Path.GetExtension(i), ".xml", StringComparison.OrdinalIgnoreCase))
.Select(Path.GetFileNameWithoutExtension) .Select(Path.GetFileNameWithoutExtension)