60 lines
1.7 KiB
C#
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;
|
|
}
|