mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
made session a little more flexible for playing non-library items
This commit is contained in:
@@ -175,6 +175,8 @@
|
||||
<Compile Include="Providers\BaseMetadataProvider.cs" />
|
||||
<Compile Include="Session\ISessionRemoteController.cs" />
|
||||
<Compile Include="Session\PlaybackInfo.cs" />
|
||||
<Compile Include="Session\PlaybackProgressInfo.cs" />
|
||||
<Compile Include="Session\PlaybackStopInfo.cs" />
|
||||
<Compile Include="Session\SessionInfo.cs" />
|
||||
<Compile Include="Sorting\IBaseItemComparer.cs" />
|
||||
<Compile Include="Sorting\IUserBaseItemComparer.cs" />
|
||||
|
||||
@@ -62,24 +62,18 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <summary>
|
||||
/// Used to report playback progress for an item
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="positionTicks">The position ticks.</param>
|
||||
/// <param name="isPaused">if set to <c>true</c> [is paused].</param>
|
||||
/// <param name="isMuted">if set to <c>true</c> [is muted].</param>
|
||||
/// <param name="sessionId">The session id.</param>
|
||||
/// <param name="info">The info.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
Task OnPlaybackProgress(BaseItem item, long? positionTicks, bool isPaused, bool isMuted, Guid sessionId);
|
||||
Task OnPlaybackProgress(PlaybackProgressInfo info);
|
||||
|
||||
/// <summary>
|
||||
/// Used to report that playback has ended for an item
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="positionTicks">The position ticks.</param>
|
||||
/// <param name="sessionId">The session id.</param>
|
||||
/// <param name="info">The info.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
Task OnPlaybackStopped(BaseItem item, long? positionTicks, Guid sessionId);
|
||||
Task OnPlaybackStopped(PlaybackStopInfo info);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the system command.
|
||||
|
||||
38
MediaBrowser.Controller/Session/PlaybackProgressInfo.cs
Normal file
38
MediaBrowser.Controller/Session/PlaybackProgressInfo.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
26
MediaBrowser.Controller/Session/PlaybackStopInfo.cs
Normal file
26
MediaBrowser.Controller/Session/PlaybackStopInfo.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user