aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-04 12:48:23 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-04 12:48:23 -0400
commit2e408e40c015b34b365d0e0ef4d7a20fc02b0b80 (patch)
tree99c8ead78374aec26ad993fb94b7b76bb908db92 /MediaBrowser.Api/Playback/BaseStreamingService.cs
parent02fedead11f738c09e503c3bdc74e2dd98e21cc8 (diff)
defer path creation when possible
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 9d5f73141..602acff09 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -562,6 +562,13 @@ namespace MediaBrowser.Api.Playback
/// <returns>Task.</returns>
protected async Task StartFfMpeg(StreamState state, string outputPath)
{
+ var parentPath = Path.GetDirectoryName(outputPath);
+
+ if (!Directory.Exists(parentPath))
+ {
+ Directory.CreateDirectory(parentPath);
+ }
+
var video = state.Item as Video;
if (video != null && video.VideoType == VideoType.Iso && video.IsoType.HasValue && IsoManager.CanMount(video.Path))