diff options
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/ApiEntryPoint.cs | 10 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 17 |
2 files changed, 5 insertions, 22 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index 8754e57a1..b648e7fd3 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -258,15 +258,7 @@ namespace MediaBrowser.Api { hasExited = process.HasExited; } - catch (Win32Exception ex) - { - Logger.ErrorException("Error determining if ffmpeg process has exited for {0}", ex, job.Path); - } - catch (InvalidOperationException ex) - { - Logger.ErrorException("Error determining if ffmpeg process has exited for {0}", ex, job.Path); - } - catch (NotSupportedException ex) + catch (Exception ex) { Logger.ErrorException("Error determining if ffmpeg process has exited for {0}", ex, job.Path); } diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 79a5a2846..f3164ad69 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -358,10 +358,7 @@ namespace MediaBrowser.Api.Playback { var parentPath = Path.GetDirectoryName(path); - if (!Directory.Exists(parentPath)) - { - Directory.CreateDirectory(parentPath); - } + Directory.CreateDirectory(parentPath); var task = MediaEncoder.ExtractTextSubtitle(inputPath, type, subtitleStream.Index, offset, path, CancellationToken.None); @@ -396,10 +393,7 @@ namespace MediaBrowser.Api.Playback { var parentPath = Path.GetDirectoryName(path); - if (!Directory.Exists(parentPath)) - { - Directory.CreateDirectory(parentPath); - } + Directory.CreateDirectory(parentPath); var task = MediaEncoder.ConvertTextSubtitleToAss(subtitleStream.Path, path, subtitleStream.Language, offset, CancellationToken.None); @@ -599,10 +593,7 @@ namespace MediaBrowser.Api.Playback { var parentPath = Path.GetDirectoryName(outputPath); - if (!Directory.Exists(parentPath)) - { - Directory.CreateDirectory(parentPath); - } + Directory.CreateDirectory(parentPath); var video = state.Item as Video; @@ -648,7 +639,7 @@ namespace MediaBrowser.Api.Playback { process.Start(); } - catch (Win32Exception ex) + catch (Exception ex) { Logger.ErrorException("Error starting ffmpeg", ex); |
