mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
fix media streaming in apiclient
This commit is contained in:
parent
c4e505c062
commit
1c9eb1911a
@ -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();
|
||||
|
@ -40,7 +40,6 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user