diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-12-17 00:30:31 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-12-17 00:30:31 -0500 |
| commit | 13274348e9e2162eca84dc8f20c4d80ade29e8bf (patch) | |
| tree | 0e38c1b2de2f430b98e24a4b816f3e80404d423e /MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | |
| parent | febaab13bf96ded1ded80d5595b138cf5ef1da54 (diff) | |
sync updates
Diffstat (limited to 'MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs index e3eb33ec5..7c512840b 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs @@ -550,7 +550,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles } }; - _logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); + _logger.Info("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); var logFilePath = Path.Combine(_appPaths.LogDirectoryPath, "ffmpeg-sub-extract-" + Guid.NewGuid() + ".txt"); Directory.CreateDirectory(Path.GetDirectoryName(logFilePath)); @@ -604,17 +604,18 @@ namespace MediaBrowser.MediaEncoding.Subtitles { failed = true; - if (File.Exists(outputPath)) + try { - try - { - _logger.Info("Deleting extracted subtitle due to failure: ", outputPath); - File.Delete(outputPath); - } - catch (IOException ex) - { - _logger.ErrorException("Error deleting extracted subtitle {0}", ex, outputPath); - } + _logger.Info("Deleting extracted subtitle due to failure: {0}", outputPath); + File.Delete(outputPath); + } + catch (FileNotFoundException) + { + + } + catch (IOException ex) + { + _logger.ErrorException("Error deleting extracted subtitle {0}", ex, outputPath); } } else if (!File.Exists(outputPath)) |
