diff --git a/MediaBrowser.ApiInteraction/BaseApiClient.cs b/MediaBrowser.ApiInteraction/BaseApiClient.cs
index bcbcc53afb..6d5a5e7cbd 100644
--- a/MediaBrowser.ApiInteraction/BaseApiClient.cs
+++ b/MediaBrowser.ApiInteraction/BaseApiClient.cs
@@ -660,7 +660,12 @@ namespace MediaBrowser.ApiInteraction
throw new ArgumentNullException("options");
}
- var handler = "audio." + options.OutputFileExtension.TrimStart('.');
+ var handler = "Audio/" + options.ItemId + "/stream";
+
+ if (!string.IsNullOrEmpty(options.OutputFileExtension))
+ {
+ handler += "." + options.OutputFileExtension.TrimStart('.');
+ }
return GetMediaStreamUrl(handler, options, new QueryStringDictionary());
}
@@ -678,7 +683,12 @@ namespace MediaBrowser.ApiInteraction
throw new ArgumentNullException("options");
}
- var handler = "video." + options.OutputFileExtension.TrimStart('.');
+ var handler = "Videos/" + options.ItemId + "/stream";
+
+ if (!string.IsNullOrEmpty(options.OutputFileExtension))
+ {
+ handler += "." + options.OutputFileExtension.TrimStart('.');
+ }
return GetVideoStreamUrl(handler, options);
}
@@ -768,8 +778,6 @@ namespace MediaBrowser.ApiInteraction
throw new ArgumentNullException("queryParams");
}
- queryParams.Add("id", options.ItemId);
-
if (options.AudioCodec.HasValue)
{
queryParams["audioCodec"] = options.AudioCodec.Value.ToString();
diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj
index 1b63f936f6..a13786e31f 100644
--- a/MediaBrowser.Common/MediaBrowser.Common.csproj
+++ b/MediaBrowser.Common/MediaBrowser.Common.csproj
@@ -40,7 +40,6 @@
-
diff --git a/MediaBrowser.Common/Net/Handlers/BaseHandler.cs b/MediaBrowser.Common/Net/Handlers/BaseHandler.cs
index 3b36300472..5d26c7e920 100644
--- a/MediaBrowser.Common/Net/Handlers/BaseHandler.cs
+++ b/MediaBrowser.Common/Net/Handlers/BaseHandler.cs
@@ -11,7 +11,6 @@ using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
-using System.Web;
namespace MediaBrowser.Common.Net.Handlers
{
@@ -108,7 +107,7 @@ namespace MediaBrowser.Common.Net.Handlers
get
{
// HttpListenerContext.Request.QueryString is not decoded properly
- return _queryString ?? (_queryString = HttpUtility.ParseQueryString(HttpListenerContext.Request.Url.Query));
+ return _queryString;
}
}