Radarr/src/NzbDrone.Api/DiskSpace/DiskSpaceModule.cs

24 lines
658 B
C#
Raw Normal View History

2018-11-23 07:03:32 +00:00
using System.Collections.Generic;
using NzbDrone.Core.DiskSpace;
2018-11-23 07:03:32 +00:00
using Radarr.Http;
namespace NzbDrone.Api.DiskSpace
{
2019-12-22 22:08:53 +00:00
public class DiskSpaceModule : RadarrRestModule<DiskSpaceResource>
{
private readonly IDiskSpaceService _diskSpaceService;
public DiskSpaceModule(IDiskSpaceService diskSpaceService)
: base("diskspace")
{
_diskSpaceService = diskSpaceService;
GetResourceAll = GetFreeSpace;
}
public List<DiskSpaceResource> GetFreeSpace()
{
return _diskSpaceService.GetFreeSpace().ConvertAll(DiskSpaceResourceMapper.MapToResource);
}
}
}