소스 검색

reduce error logging

Luke Pulverenti 8 년 전
부모
커밋
4c08d26ad4
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      MediaBrowser.Providers/TV/MissingEpisodeProvider.cs

+ 6 - 0
MediaBrowser.Providers/TV/MissingEpisodeProvider.cs

@@ -93,6 +93,12 @@ namespace MediaBrowser.Providers.TV
                 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)
                 .Where(i => string.Equals(Path.GetExtension(i), ".xml", StringComparison.OrdinalIgnoreCase))
                 .Select(Path.GetFileNameWithoutExtension)