diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-04 12:48:23 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-04 12:48:23 -0400 |
| commit | 2e408e40c015b34b365d0e0ef4d7a20fc02b0b80 (patch) | |
| tree | 99c8ead78374aec26ad993fb94b7b76bb908db92 /MediaBrowser.Api/Playback/BaseStreamingService.cs | |
| parent | 02fedead11f738c09e503c3bdc74e2dd98e21cc8 (diff) | |
defer path creation when possible
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 7 |
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)) |
