소스 검색

Merge pull request #11165 from vessd/transcoding-exception

Catch delete encoded media file exceptions
Bond-009 1 년 전
부모
커밋
8070aabe1b
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs

+ 8 - 1
MediaBrowser.MediaEncoding/Transcoding/TranscodeManager.cs

@@ -724,7 +724,14 @@ public sealed class TranscodeManager : ITranscodeManager, IDisposable
 
         foreach (var file in _fileSystem.GetFilePaths(path, true))
         {
-            _fileSystem.DeleteFile(file);
+            try
+            {
+                _fileSystem.DeleteFile(file);
+            }
+            catch (Exception ex)
+            {
+                _logger.LogError(ex, "Error deleting encoded media cache file {Path}", path);
+            }
         }
     }