mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
fix media streaming in apiclient
This commit is contained in:
parent
c4e505c062
commit
1c9eb1911a
3 changed files with 13 additions and 7 deletions
|
@ -660,7 +660,12 @@ namespace MediaBrowser.ApiInteraction
|
||||||
throw new ArgumentNullException("options");
|
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());
|
return GetMediaStreamUrl(handler, options, new QueryStringDictionary());
|
||||||
}
|
}
|
||||||
|
@ -678,7 +683,12 @@ namespace MediaBrowser.ApiInteraction
|
||||||
throw new ArgumentNullException("options");
|
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);
|
return GetVideoStreamUrl(handler, options);
|
||||||
}
|
}
|
||||||
|
@ -768,8 +778,6 @@ namespace MediaBrowser.ApiInteraction
|
||||||
throw new ArgumentNullException("queryParams");
|
throw new ArgumentNullException("queryParams");
|
||||||
}
|
}
|
||||||
|
|
||||||
queryParams.Add("id", options.ItemId);
|
|
||||||
|
|
||||||
if (options.AudioCodec.HasValue)
|
if (options.AudioCodec.HasValue)
|
||||||
{
|
{
|
||||||
queryParams["audioCodec"] = options.AudioCodec.Value.ToString();
|
queryParams["audioCodec"] = options.AudioCodec.Value.ToString();
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Web" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -11,7 +11,6 @@ using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Web;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Common.Net.Handlers
|
namespace MediaBrowser.Common.Net.Handlers
|
||||||
{
|
{
|
||||||
|
@ -108,7 +107,7 @@ namespace MediaBrowser.Common.Net.Handlers
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
// HttpListenerContext.Request.QueryString is not decoded properly
|
// HttpListenerContext.Request.QueryString is not decoded properly
|
||||||
return _queryString ?? (_queryString = HttpUtility.ParseQueryString(HttpListenerContext.Request.Url.Query));
|
return _queryString;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue