added ControllableByUserId to sessions url
This commit is contained in:
parent
088df67fca
commit
631b7b62c1
|
@ -247,7 +247,16 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
{
|
||||
var probeSize = GetProbeSizeArgument(state.Item);
|
||||
|
||||
var args = string.Format("-itsoffset 1 {0} {1} {2} -i {3}{4} -threads 0 {5} {6} -sc_threshold 0 {7} -hls_time 10 -start_number 0 -hls_list_size 1440 \"{8}\"",
|
||||
var hlsVideoRequest = state.VideoRequest as GetHlsVideoStream;
|
||||
|
||||
var itsOffsetMs = hlsVideoRequest == null
|
||||
? 0
|
||||
: ((GetHlsVideoStream) state.VideoRequest).TimeStampOffsetMs;
|
||||
|
||||
var itsOffset = itsOffsetMs == 0 ? string.Empty : string.Format("-itsoffset {0} ", TimeSpan.FromMilliseconds(itsOffsetMs).TotalSeconds);
|
||||
|
||||
var args = string.Format("{0}{1} {2} {3} -i {4}{5} -threads 0 {6} {7} -sc_threshold 0 {8} -hls_time 10 -start_number 0 -hls_list_size 1440 \"{9}\"",
|
||||
itsOffset,
|
||||
probeSize,
|
||||
GetUserAgentParam(state.Item),
|
||||
GetFastSeekCommandLineParameter(state.Request),
|
||||
|
@ -259,8 +268,6 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
outputPath
|
||||
).Trim();
|
||||
|
||||
var hlsVideoRequest = state.VideoRequest as GetHlsVideoStream;
|
||||
|
||||
if (hlsVideoRequest != null)
|
||||
{
|
||||
if (hlsVideoRequest.AppendBaselineStream && state.Item is Video)
|
||||
|
|
|
@ -21,6 +21,14 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
|
||||
[ApiMember(Name = "AppendBaselineStream", Description = "Optional. Whether or not to include a baseline audio-only stream in the master playlist.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||
public bool AppendBaselineStream { get; set; }
|
||||
|
||||
[ApiMember(Name = "TimeStampOffsetMs", Description = "Optional. Alter the timestamps in the playlist by a given amount, in ms. Default is 1000.", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
|
||||
public int TimeStampOffsetMs { get; set; }
|
||||
|
||||
public GetHlsVideoStream()
|
||||
{
|
||||
TimeStampOffsetMs = 1000;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -25,6 +25,9 @@ namespace MediaBrowser.Api
|
|||
/// <value><c>null</c> if [supports remote control] contains no value, <c>true</c> if [supports remote control]; otherwise, <c>false</c>.</value>
|
||||
[ApiMember(Name = "SupportsRemoteControl", Description = "Optional. Filter by sessions that can be remote controlled.", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
|
||||
public bool? SupportsRemoteControl { get; set; }
|
||||
|
||||
[ApiMember(Name = "ControllableByUserId", Description = "Optional. Filter by sessions that a given user is allowed to remote control.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||
public Guid? ControllableByUserId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -296,6 +296,9 @@
|
|||
<Compile Include="..\MediaBrowser.Model\Querying\PersonsQuery.cs">
|
||||
<Link>Querying\PersonsQuery.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.Model\Querying\SessionQuery.cs">
|
||||
<Link>Querying\SessionQuery.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.Model\Querying\SimilarItemsQuery.cs">
|
||||
<Link>Querying\SimilarItemsQuery.cs</Link>
|
||||
</Compile>
|
||||
|
|
|
@ -280,6 +280,9 @@
|
|||
<Compile Include="..\MediaBrowser.Model\Querying\PersonsQuery.cs">
|
||||
<Link>Querying\PersonsQuery.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.Model\Querying\SessionQuery.cs">
|
||||
<Link>Querying\SessionQuery.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\MediaBrowser.Model\Querying\SimilarItemsQuery.cs">
|
||||
<Link>Querying\SimilarItemsQuery.cs</Link>
|
||||
</Compile>
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace MediaBrowser.Model.ApiClient
|
|||
/// Gets active client sessions.
|
||||
/// </summary>
|
||||
/// <returns>Task{SessionInfoDto[]}.</returns>
|
||||
Task<SessionInfoDto[]> GetClientSessionsAsync();
|
||||
Task<SessionInfoDto[]> GetClientSessionsAsync(SessionQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the item counts async.
|
||||
|
|
|
@ -89,6 +89,12 @@
|
|||
/// </summary>
|
||||
/// <value><c>true</c> if [append baseline stream]; otherwise, <c>false</c>.</value>
|
||||
public bool AppendBaselineStream { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the time stamp offset ms. Only used with HLS.
|
||||
/// </summary>
|
||||
/// <value>The time stamp offset ms.</value>
|
||||
public int? TimeStampOffsetMs { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
<Compile Include="Querying\ItemsByNameQuery.cs" />
|
||||
<Compile Include="Entities\BaseItemInfo.cs" />
|
||||
<Compile Include="Querying\NextUpQuery.cs" />
|
||||
<Compile Include="Querying\SessionQuery.cs" />
|
||||
<Compile Include="Querying\SimilarItemsQuery.cs" />
|
||||
<Compile Include="Querying\UserQuery.cs" />
|
||||
<Compile Include="Session\BrowseRequest.cs" />
|
||||
|
|
19
MediaBrowser.Model/Querying/SessionQuery.cs
Normal file
19
MediaBrowser.Model/Querying/SessionQuery.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
/// <summary>
|
||||
/// Class SessionQuery
|
||||
/// </summary>
|
||||
public class SessionQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Filter by sessions that are allowed to be controlled by a given user
|
||||
/// </summary>
|
||||
public string ControllableByUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Filter by sessions that either do or do not support remote control. Default returns all sessions.
|
||||
/// </summary>
|
||||
public bool? SupportsRemoteControl { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user