blob: 05ff262c1ea943012bc21037f81986cfbda0fd9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#nullable disable
using System;
using System.Collections.Generic;
using System.Threading;
using MediaBrowser.Controller.Session;
using MediaBrowser.Model.SyncPlay;
namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
{
/// <summary>
/// Class PlayGroupRequest.
/// </summary>
public class PlayGroupRequest : AbstractPlaybackRequest
{
/// <summary>
/// Initializes a new instance of the <see cref="PlayGroupRequest"/> class.
/// </summary>
/// <param name="playingQueue">The playing queue.</param>
/// <param name="playingItemPosition">The playing item position.</param>
/// <param name="startPositionTicks">The start position ticks.</param>
public PlayGroupRequest(IReadOnlyList<Guid> playingQueue, int playingItemPosition, long startPositionTicks)
{
PlayingQueue = playingQueue ?? Array.Empty<Guid>();
PlayingItemPosition = playingItemPosition;
StartPositionTicks = startPositionTicks;
}
/// <summary>
/// Gets the playing queue.
/// </summary>
/// <value>The playing queue.</value>
public IReadOnlyList<Guid> PlayingQueue { get; }
/// <summary>
/// Gets the position of the playing item in the queue.
/// </summary>
/// <value>The playing item position.</value>
public int PlayingItemPosition { get; }
/// <summary>
/// Gets the start position ticks.
/// </summary>
/// <value>The start position ticks.</value>
public long StartPositionTicks { get; }
/// <inheritdoc />
public override PlaybackRequestType Action { get; } = PlaybackRequestType.Play;
/// <inheritdoc />
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
{
state.HandleRequest(this, context, state.Type, session, cancellationToken);
}
}
}
|