aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api')
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs16
-rw-r--r--MediaBrowser.Api/EnvironmentService.cs5
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs2
-rw-r--r--MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs6
4 files changed, 16 insertions, 13 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index a2ed1d7722..431b6d6151 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -82,7 +82,9 @@ namespace MediaBrowser.Api
/// <param name="path">The path.</param>
/// <param name="type">The type.</param>
/// <param name="process">The process.</param>
- public void OnTranscodeBeginning(string path, TranscodingJobType type, Process process)
+ /// <param name="isVideo">if set to <c>true</c> [is video].</param>
+ /// <param name="startTimeTicks">The start time ticks.</param>
+ public void OnTranscodeBeginning(string path, TranscodingJobType type, Process process, bool isVideo, long? startTimeTicks)
{
lock (_activeTranscodingJobs)
{
@@ -91,7 +93,9 @@ namespace MediaBrowser.Api
Type = type,
Path = path,
Process = process,
- ActiveRequestCount = 1
+ ActiveRequestCount = 1,
+ IsVideo = isVideo,
+ StartTimeTicks = startTimeTicks
});
}
}
@@ -262,7 +266,7 @@ namespace MediaBrowser.Api
}
catch (InvalidOperationException)
{
-
+
}
catch (NotSupportedException)
{
@@ -273,7 +277,8 @@ namespace MediaBrowser.Api
process.Dispose();
// If it didn't complete successfully cleanup the partial files
- if (!hasExitedSuccessfully)
+ // Also don't cache output from resume points
+ if (!hasExitedSuccessfully || job.StartTimeTicks.HasValue)
{
Logger.Info("Deleting partial stream file(s) {0}", job.Path);
@@ -364,6 +369,9 @@ namespace MediaBrowser.Api
/// </summary>
/// <value>The kill timer.</value>
public Timer KillTimer { get; set; }
+
+ public bool IsVideo { get; set; }
+ public long? StartTimeTicks { get; set; }
}
/// <summary>
diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs
index 9d11178c84..d88d855940 100644
--- a/MediaBrowser.Api/EnvironmentService.cs
+++ b/MediaBrowser.Api/EnvironmentService.cs
@@ -207,11 +207,6 @@ namespace MediaBrowser.Api
{
var entries = new DirectoryInfo(request.Path).EnumerateFileSystemInfos().Where(i =>
{
- if (i.Attributes.HasFlag(FileAttributes.System))
- {
- return false;
- }
-
if (!request.IncludeHidden && i.Attributes.HasFlag(FileAttributes.Hidden))
{
return false;
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 4886af9163..1c1b569d7a 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -598,7 +598,7 @@ namespace MediaBrowser.Api.Playback
EnableRaisingEvents = true
};
- ApiEntryPoint.Instance.OnTranscodeBeginning(outputPath, TranscodingJobType, process);
+ ApiEntryPoint.Instance.OnTranscodeBeginning(outputPath, TranscodingJobType, process, video != null, state.Request.StartTimeTicks);
Logger.Info(process.StartInfo.FileName + " " + process.StartInfo.Arguments);
diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
index cd8423c3dc..961c8770c9 100644
--- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
+++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
@@ -199,10 +199,10 @@ namespace MediaBrowser.Api.Playback.Progressive
var outputPath = GetOutputFilePath(state);
var outputPathExists = File.Exists(outputPath);
- var isStatic = request.Static ||
- (outputPathExists && !ApiEntryPoint.Instance.HasActiveTranscodingJob(outputPath, TranscodingJobType.Progressive));
+ //var isStatic = request.Static ||
+ // (outputPathExists && !ApiEntryPoint.Instance.HasActiveTranscodingJob(outputPath, TranscodingJobType.Progressive));
- AddDlnaHeaders(state, responseHeaders, isStatic);
+ //AddDlnaHeaders(state, responseHeaders, isStatic);
if (request.Static)
{