mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Remove deprecated GetWakeOnLanInfo endpoint
This commit is contained in:
parent
a9f84b92df
commit
83b2c47237
@ -212,20 +212,4 @@ public class SystemController : BaseJellyfinApiController
|
|||||||
FileStream stream = new FileStream(file.FullName, FileMode.Open, FileAccess.Read, fileShare, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous);
|
FileStream stream = new FileStream(file.FullName, FileMode.Open, FileAccess.Read, fileShare, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous);
|
||||||
return File(stream, "text/plain; charset=utf-8");
|
return File(stream, "text/plain; charset=utf-8");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets wake on lan information.
|
|
||||||
/// </summary>
|
|
||||||
/// <response code="200">Information retrieved.</response>
|
|
||||||
/// <returns>An <see cref="IEnumerable{WakeOnLanInfo}"/> with the WakeOnLan infos.</returns>
|
|
||||||
[HttpGet("WakeOnLanInfo")]
|
|
||||||
[Authorize]
|
|
||||||
[Obsolete("This endpoint is obsolete.")]
|
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
|
||||||
public ActionResult<IEnumerable<WakeOnLanInfo>> GetWakeOnLanInfo()
|
|
||||||
{
|
|
||||||
var result = _networkManager.GetMacAddresses()
|
|
||||||
.Select(i => new WakeOnLanInfo(i));
|
|
||||||
return Ok(result);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
using System.Net.NetworkInformation;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.System
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Provides the MAC address and port for wake-on-LAN functionality.
|
|
||||||
/// </summary>
|
|
||||||
public class WakeOnLanInfo
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="macAddress">The MAC address.</param>
|
|
||||||
public WakeOnLanInfo(PhysicalAddress macAddress) : this(macAddress.ToString())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="macAddress">The MAC address.</param>
|
|
||||||
public WakeOnLanInfo(string macAddress) : this()
|
|
||||||
{
|
|
||||||
MacAddress = macAddress;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
|
|
||||||
/// </summary>
|
|
||||||
public WakeOnLanInfo()
|
|
||||||
{
|
|
||||||
Port = 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the MAC address of the device.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The MAC address.</value>
|
|
||||||
public string? MacAddress { get; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the wake-on-LAN port.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The wake-on-LAN port.</value>
|
|
||||||
public int Port { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user