aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2014-12-17 17:42:31 -0500
committerLuke <luke.pulverenti@gmail.com>2014-12-17 17:42:31 -0500
commita7f2bc5fda526e227e0dbdd23e0d408ed627da14 (patch)
tree9d3ca8e950bc8a0aae88fad7005971ec937f9e5a /MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
parent999f2e03f4cbd70bb5f253fd7d4c9bc11bf9c963 (diff)
parente3484bdcc204ae39e0bfdf08e758012a048d539c (diff)
Merge pull request #956 from MediaBrowser/dev
3.0.5464.40000
Diffstat (limited to 'MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs23
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))