aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/BaseStreamingService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 674f3170e..cde6f725a 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -32,6 +32,8 @@ namespace MediaBrowser.Api.Playback
{
protected static readonly CultureInfo UsCulture = CultureInfo.ReadOnly(new CultureInfo("en-US"));
+ protected virtual bool EnableOutputInSubFolder => false;
+
/// <summary>
/// Gets or sets the application paths.
/// </summary>
@@ -142,10 +144,16 @@ namespace MediaBrowser.Api.Playback
data += "-" + (state.Request.DeviceId ?? string.Empty)
+ "-" + (state.Request.PlaySessionId ?? string.Empty);
- var filename = data.GetMD5().ToString("N") + outputFileExtension.ToLowerInvariant();
+ var filename = data.GetMD5().ToString("N");
+ var ext = outputFileExtension.ToLowerInvariant();
var folder = ServerConfigurationManager.ApplicationPaths.TranscodingTempPath;
- return Path.Combine(folder, filename);
+ if (EnableOutputInSubFolder)
+ {
+ return Path.Combine(folder, filename, filename + ext);
+ }
+
+ return Path.Combine(folder, filename + ext);
}
protected virtual string GetDefaultH264Preset() => "superfast";