using System;
using System.Collections.Generic;
namespace Jellyfin.Plugin.JellyLMS.Models;
///
/// Represents the current playback state.
///
public enum PlaybackState
{
///
/// Playback is stopped.
///
Stopped,
///
/// Playback is active.
///
Playing,
///
/// Playback is paused.
///
Paused
}
///
/// Represents an active playback session bridging Jellyfin to LMS.
///
public class LmsPlaybackSession
{
///
/// Gets or sets the unique session identifier.
///
public string SessionId { get; set; } = Guid.NewGuid().ToString();
///
/// Gets or sets the Jellyfin session ID.
///
public string? JellyfinSessionId { get; set; }
///
/// Gets or sets the Jellyfin item ID being played.
///
public Guid ItemId { get; set; }
///
/// Gets or sets the item name for display.
///
public string ItemName { get; set; } = string.Empty;
///
/// Gets or sets the artist name (for audio).
///
public string? Artist { get; set; }
///
/// Gets or sets the album name (for audio).
///
public string? Album { get; set; }
///
/// Gets or sets the MAC addresses of LMS players in this session.
///
public List PlayerMacs { get; set; } = [];
///
/// Gets or sets the current playback state.
///
public PlaybackState State { get; set; } = PlaybackState.Stopped;
///
/// Gets or sets the current playback position in ticks.
///
public long PositionTicks { get; set; }
///
/// Gets or sets the total runtime in ticks.
///
public long RuntimeTicks { get; set; }
///
/// Gets or sets when this session started.
///
public DateTime StartedAt { get; set; } = DateTime.UtcNow;
///
/// Gets or sets the audio stream URL being played on LMS.
///
public string? StreamUrl { get; set; }
///
/// Gets or sets the Jellyfin user ID who initiated playback.
///
public Guid? UserId { get; set; }
}