mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-14 06:12:17 +01:00
add new playback checkin endpoints
This commit is contained in:
@@ -251,9 +251,6 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Session\ISessionController.cs" />
|
||||
<Compile Include="Session\ISessionControllerFactory.cs" />
|
||||
<Compile Include="Session\PlaybackInfo.cs" />
|
||||
<Compile Include="Session\PlaybackProgressInfo.cs" />
|
||||
<Compile Include="Session\PlaybackStopInfo.cs" />
|
||||
<Compile Include="Session\SessionEventArgs.cs" />
|
||||
<Compile Include="Session\SessionInfo.cs" />
|
||||
<Compile Include="Sorting\IBaseItemComparer.cs" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Session;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -68,7 +69,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// </summary>
|
||||
/// <param name="info">The info.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task OnPlaybackStart(PlaybackInfo info);
|
||||
Task OnPlaybackStart(PlaybackStartInfo info);
|
||||
|
||||
/// <summary>
|
||||
/// Used to report playback progress for an item
|
||||
@@ -91,7 +92,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session identifier.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ReportSessionEnded(Guid sessionId);
|
||||
Task ReportSessionEnded(string sessionId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the session info dto.
|
||||
@@ -108,7 +109,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="command">The command.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendGeneralCommand(Guid controllingSessionId, Guid sessionId, GeneralCommand command, CancellationToken cancellationToken);
|
||||
Task SendGeneralCommand(string controllingSessionId, string sessionId, GeneralCommand command, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the message command.
|
||||
@@ -118,7 +119,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="command">The command.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendMessageCommand(Guid controllingSessionId, Guid sessionId, MessageCommand command, CancellationToken cancellationToken);
|
||||
Task SendMessageCommand(string controllingSessionId, string sessionId, MessageCommand command, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the play command.
|
||||
@@ -128,7 +129,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="command">The command.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendPlayCommand(Guid controllingSessionId, Guid sessionId, PlayRequest command, CancellationToken cancellationToken);
|
||||
Task SendPlayCommand(string controllingSessionId, string sessionId, PlayRequest command, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the browse command.
|
||||
@@ -138,7 +139,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="command">The command.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendBrowseCommand(Guid controllingSessionId, Guid sessionId, BrowseRequest command, CancellationToken cancellationToken);
|
||||
Task SendBrowseCommand(string controllingSessionId, string sessionId, BrowseRequest command, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the playstate command.
|
||||
@@ -148,7 +149,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="command">The command.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendPlaystateCommand(Guid controllingSessionId, Guid sessionId, PlaystateRequest command, CancellationToken cancellationToken);
|
||||
Task SendPlaystateCommand(string controllingSessionId, string sessionId, PlaystateRequest command, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the restart required message.
|
||||
@@ -176,15 +177,31 @@ namespace MediaBrowser.Controller.Session
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session identifier.</param>
|
||||
/// <param name="userId">The user identifier.</param>
|
||||
void AddAdditionalUser(Guid sessionId, Guid userId);
|
||||
void AddAdditionalUser(string sessionId, Guid userId);
|
||||
|
||||
/// <summary>
|
||||
/// Removes the additional user.
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session identifier.</param>
|
||||
/// <param name="userId">The user identifier.</param>
|
||||
void RemoveAdditionalUser(Guid sessionId, Guid userId);
|
||||
void RemoveAdditionalUser(string sessionId, Guid userId);
|
||||
|
||||
/// <summary>
|
||||
/// Reports the now viewing item.
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session identifier.</param>
|
||||
/// <param name="itemId">The item identifier.</param>
|
||||
/// <param name="context">The context.</param>
|
||||
void ReportNowViewingItem(string sessionId, string itemId, string context);
|
||||
|
||||
/// <summary>
|
||||
/// Reports the now viewing item.
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session identifier.</param>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="context">The context.</param>
|
||||
void ReportNowViewingItem(string sessionId, BaseItemInfo item, string context);
|
||||
|
||||
/// <summary>
|
||||
/// Authenticates the new session.
|
||||
/// </summary>
|
||||
@@ -203,6 +220,6 @@ namespace MediaBrowser.Controller.Session
|
||||
/// </summary>
|
||||
/// <param name="sessionId">The session identifier.</param>
|
||||
/// <param name="capabilities">The capabilities.</param>
|
||||
void ReportCapabilities(Guid sessionId, SessionCapabilities capabilities);
|
||||
void ReportCapabilities(string sessionId, SessionCapabilities capabilities);
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
public class PlaybackInfo
|
||||
{
|
||||
public PlaybackInfo()
|
||||
{
|
||||
QueueableMediaTypes = new List<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can seek.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
|
||||
public bool CanSeek { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the queueable media types.
|
||||
/// </summary>
|
||||
/// <value>The queueable media types.</value>
|
||||
public List<string> QueueableMediaTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item.
|
||||
/// </summary>
|
||||
/// <value>The item.</value>
|
||||
public BaseItem Item { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the session id.
|
||||
/// </summary>
|
||||
/// <value>The session id.</value>
|
||||
public Guid SessionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media version identifier.
|
||||
/// </summary>
|
||||
/// <value>The media version identifier.</value>
|
||||
public string MediaSourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the index of the audio stream.
|
||||
/// </summary>
|
||||
/// <value>The index of the audio stream.</value>
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the index of the subtitle stream.
|
||||
/// </summary>
|
||||
/// <value>The index of the subtitle stream.</value>
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
public class PlaybackProgressInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the item.
|
||||
/// </summary>
|
||||
/// <value>The item.</value>
|
||||
public BaseItem Item { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the session id.
|
||||
/// </summary>
|
||||
/// <value>The session id.</value>
|
||||
public Guid SessionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is paused.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is paused; otherwise, <c>false</c>.</value>
|
||||
public bool IsPaused { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is muted.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value>
|
||||
public bool IsMuted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the position ticks.
|
||||
/// </summary>
|
||||
/// <value>The position ticks.</value>
|
||||
public long? PositionTicks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media version identifier.
|
||||
/// </summary>
|
||||
/// <value>The media version identifier.</value>
|
||||
public string MediaSourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the volume level.
|
||||
/// </summary>
|
||||
/// <value>The volume level.</value>
|
||||
public int? VolumeLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the index of the audio stream.
|
||||
/// </summary>
|
||||
/// <value>The index of the audio stream.</value>
|
||||
public int? AudioStreamIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the index of the subtitle stream.
|
||||
/// </summary>
|
||||
/// <value>The index of the subtitle stream.</value>
|
||||
public int? SubtitleStreamIndex { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Controller.Session
|
||||
{
|
||||
public class PlaybackStopInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the item.
|
||||
/// </summary>
|
||||
/// <value>The item.</value>
|
||||
public BaseItem Item { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the session id.
|
||||
/// </summary>
|
||||
/// <value>The session id.</value>
|
||||
public Guid SessionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the position ticks.
|
||||
/// </summary>
|
||||
/// <value>The position ticks.</value>
|
||||
public long? PositionTicks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media version identifier.
|
||||
/// </summary>
|
||||
/// <value>The media version identifier.</value>
|
||||
public string MediaSourceId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Session;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -26,8 +25,11 @@ namespace MediaBrowser.Controller.Session
|
||||
|
||||
AdditionalUsers = new List<SessionUserInfo>();
|
||||
SupportedCommands = new List<string>();
|
||||
PlayState = new PlayerStateInfo();
|
||||
}
|
||||
|
||||
public PlayerStateInfo PlayState { get; set; }
|
||||
|
||||
public List<SessionUserInfo> AdditionalUsers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -36,12 +38,6 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <value>The remote end point.</value>
|
||||
public string RemoteEndPoint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can seek.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
|
||||
public bool CanSeek { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the queueable media types.
|
||||
/// </summary>
|
||||
@@ -58,7 +54,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// Gets or sets the id.
|
||||
/// </summary>
|
||||
/// <value>The id.</value>
|
||||
public Guid Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
@@ -96,68 +92,17 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <value>The now viewing context.</value>
|
||||
public string NowViewingContext { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the now viewing item.
|
||||
/// </summary>
|
||||
/// <value>The type of the now viewing item.</value>
|
||||
public string NowViewingItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the now viewing item identifier.
|
||||
/// </summary>
|
||||
/// <value>The now viewing item identifier.</value>
|
||||
public string NowViewingItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the now viewing item.
|
||||
/// </summary>
|
||||
/// <value>The name of the now viewing item.</value>
|
||||
public string NowViewingItemName { get; set; }
|
||||
public BaseItemInfo NowViewingItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the now playing item.
|
||||
/// </summary>
|
||||
/// <value>The now playing item.</value>
|
||||
public BaseItem NowPlayingItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the now playing media version identifier.
|
||||
/// </summary>
|
||||
/// <value>The now playing media version identifier.</value>
|
||||
public string NowPlayingMediaSourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the now playing run time ticks.
|
||||
/// </summary>
|
||||
/// <value>The now playing run time ticks.</value>
|
||||
public long? NowPlayingRunTimeTicks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the now playing position ticks.
|
||||
/// </summary>
|
||||
/// <value>The now playing position ticks.</value>
|
||||
public long? NowPlayingPositionTicks { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is paused.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is paused; otherwise, <c>false</c>.</value>
|
||||
public bool IsPaused { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is muted.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value>
|
||||
public bool IsMuted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the volume level, on a scale of 0-100
|
||||
/// </summary>
|
||||
/// <value>The volume level.</value>
|
||||
public int? VolumeLevel { get; set; }
|
||||
|
||||
public int? NowPlayingAudioStreamIndex { get; set; }
|
||||
|
||||
public int? NowPlayingSubtitleStreamIndex { get; set; }
|
||||
public BaseItemInfo NowPlayingItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the device id.
|
||||
|
||||
Reference in New Issue
Block a user