aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-01 14:24:27 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-01 14:24:27 -0400
commit3d40c5ba36c5e98954c2bc6073b4cf35cd42711a (patch)
treebe7328c6d1d2193041c9b3dd00ff40fd0f825599 /MediaBrowser.Api/Playback/BaseStreamingService.cs
parent900266eb54e3b13219eb21e6d22fb34ce28059ab (diff)
fixed xml providers running over and over
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs17
1 files changed, 4 insertions, 13 deletions
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);