2018-11-23 07:03:32 +00:00
|
|
|
using Radarr.Http.REST;
|
|
|
|
|
2019-12-03 01:36:18 +00:00
|
|
|
namespace Radarr.Api.V3.DiskSpace
|
2018-11-23 07:03:32 +00:00
|
|
|
{
|
|
|
|
public class DiskSpaceResource : RestResource
|
|
|
|
{
|
|
|
|
public string Path { get; set; }
|
|
|
|
public string Label { get; set; }
|
|
|
|
public long FreeSpace { get; set; }
|
|
|
|
public long TotalSpace { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public static class DiskSpaceResourceMapper
|
|
|
|
{
|
|
|
|
public static DiskSpaceResource MapToResource(this NzbDrone.Core.DiskSpace.DiskSpace model)
|
|
|
|
{
|
2019-12-22 22:08:53 +00:00
|
|
|
if (model == null)
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
2018-11-23 07:03:32 +00:00
|
|
|
|
|
|
|
return new DiskSpaceResource
|
|
|
|
{
|
|
|
|
Path = model.Path,
|
|
|
|
Label = model.Label,
|
|
|
|
FreeSpace = model.FreeSpace,
|
|
|
|
TotalSpace = model.TotalSpace
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|