diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj
index 2819a649aa..fb06e35ea3 100644
--- a/MediaBrowser.Api/MediaBrowser.Api.csproj
+++ b/MediaBrowser.Api/MediaBrowser.Api.csproj
@@ -56,6 +56,8 @@
+
+
@@ -82,6 +84,7 @@
+
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 04b6a656d5..19b339cd74 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -621,10 +621,27 @@ namespace MediaBrowser.Api.Playback
/// The item.
/// System.String.
protected string GetUserAgentParam(BaseItem item)
+ {
+ var useragent = GetUserAgent(item);
+
+ if (!string.IsNullOrEmpty(useragent))
+ {
+ return "-user-agent \"" + useragent + "\"";
+ }
+
+ return string.Empty;
+ }
+
+ ///
+ /// Gets the user agent.
+ ///
+ /// The item.
+ /// System.String.
+ protected string GetUserAgent(BaseItem item)
{
if (item.Path.IndexOf("apple.com", StringComparison.OrdinalIgnoreCase) != -1)
{
- return "-user-agent \"QuickTime/7.6.2\"";
+ return "QuickTime/7.6.2";
}
return string.Empty;
diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
index 9bcce87c89..50a0c9accd 100644
--- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
+++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs
@@ -1,4 +1,7 @@
-using MediaBrowser.Api.Images;
+using System.Net;
+using System.Net.Cache;
+using System.Net.Http;
+using MediaBrowser.Api.Images;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.MediaInfo;
using MediaBrowser.Common.Net;
@@ -188,6 +191,11 @@ namespace MediaBrowser.Api.Playback.Progressive
var responseHeaders = new Dictionary();
+ if (request.Static && state.Item.LocationType == LocationType.Remote)
+ {
+ return GetStaticRemoteStreamResult(state.Item, responseHeaders, isHeadRequest).Result;
+ }
+
var outputPath = GetOutputFilePath(state);
var outputPathExists = File.Exists(outputPath);
@@ -209,6 +217,60 @@ namespace MediaBrowser.Api.Playback.Progressive
return GetStreamResult(state, responseHeaders, isHeadRequest).Result;
}
+ ///
+ /// Gets the static remote stream result.
+ ///
+ /// The item.
+ /// The response headers.
+ /// if set to true [is head request].
+ /// Task{System.Object}.
+ private async Task