< Summary - Jellyfin

Information
Class: MediaBrowser.Controller.SyncPlay.PlaybackRequests.BufferGroupRequest
Assembly: MediaBrowser.Controller
File(s): /srv/git/jellyfin/MediaBrowser.Controller/SyncPlay/PlaybackRequests/BufferGroupRequest.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 63
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
Apply(...)100%210%

File(s)

/srv/git/jellyfin/MediaBrowser.Controller/SyncPlay/PlaybackRequests/BufferGroupRequest.cs

#LineLine coverage
 1#nullable disable
 2
 3using System;
 4using System.Threading;
 5using MediaBrowser.Controller.Session;
 6using MediaBrowser.Model.SyncPlay;
 7
 8namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
 9{
 10    /// <summary>
 11    /// Class BufferGroupRequest.
 12    /// </summary>
 13    public class BufferGroupRequest : AbstractPlaybackRequest
 14    {
 15        /// <summary>
 16        /// Initializes a new instance of the <see cref="BufferGroupRequest"/> class.
 17        /// </summary>
 18        /// <param name="when">When the request has been made, as reported by the client.</param>
 19        /// <param name="positionTicks">The position ticks.</param>
 20        /// <param name="isPlaying">Whether the client playback is unpaused.</param>
 21        /// <param name="playlistItemId">The playlist item identifier of the playing item.</param>
 022        public BufferGroupRequest(DateTime when, long positionTicks, bool isPlaying, Guid playlistItemId)
 23        {
 24            When = when;
 25            PositionTicks = positionTicks;
 26            IsPlaying = isPlaying;
 27            PlaylistItemId = playlistItemId;
 028        }
 29
 30        /// <summary>
 31        /// Gets when the request has been made by the client.
 32        /// </summary>
 33        /// <value>The date of the request.</value>
 34        public DateTime When { get; }
 35
 36        /// <summary>
 37        /// Gets the position ticks.
 38        /// </summary>
 39        /// <value>The position ticks.</value>
 40        public long PositionTicks { get; }
 41
 42        /// <summary>
 43        /// Gets a value indicating whether the client playback is unpaused.
 44        /// </summary>
 45        /// <value>The client playback status.</value>
 46        public bool IsPlaying { get; }
 47
 48        /// <summary>
 49        /// Gets the playlist item identifier of the playing item.
 50        /// </summary>
 51        /// <value>The playlist item identifier.</value>
 52        public Guid PlaylistItemId { get; }
 53
 54        /// <inheritdoc />
 55        public override PlaybackRequestType Action { get; } = PlaybackRequestType.Buffer;
 56
 57        /// <inheritdoc />
 58        public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken
 59        {
 060            state.HandleRequest(this, context, state.Type, session, cancellationToken);
 061        }
 62    }
 63}