Duncan Tourolle 2f5a182afd
Some checks failed
🏗️ Build Plugin / call (push) Failing after 0s
📝 Create/Update Release Draft & Release Bump PR / call (push) Failing after 0s
🔬 Run CodeQL / call (push) Failing after 0s
🧪 Test Plugin / call (push) Failing after 0s
First POC with working playback
2025-12-13 23:54:33 +01:00

60 lines
1.7 KiB
C#

using System.Collections.Generic;
namespace Jellyfin.Plugin.JellyLMS.Models;
/// <summary>
/// Represents an LMS player/zone.
/// </summary>
public class LmsPlayer
{
/// <summary>
/// Gets or sets the player's display name.
/// </summary>
public string Name { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the player's MAC address (unique identifier).
/// </summary>
public string MacAddress { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the player's IP address.
/// </summary>
public string IpAddress { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether the player is connected to LMS.
/// </summary>
public bool IsConnected { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the player is powered on.
/// </summary>
public bool IsPoweredOn { get; set; }
/// <summary>
/// Gets or sets the player's current volume (0-100).
/// </summary>
public int Volume { get; set; }
/// <summary>
/// Gets or sets the player model name.
/// </summary>
public string Model { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the MAC address of the sync master, if this player is synced.
/// </summary>
public string? SyncMaster { get; set; }
/// <summary>
/// Gets or sets the list of synced player MAC addresses (if this is a sync master).
/// </summary>
public List<string> SyncSlaves { get; set; } = [];
/// <summary>
/// Gets a value indicating whether this player is part of a sync group.
/// </summary>
public bool IsSynced => !string.IsNullOrEmpty(SyncMaster) || SyncSlaves.Count > 0;
}