mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-02 08:47:59 +02:00
New: Add backup size information
Closes #957 (cherry picked from commit 78aeda1a2cc217c367c5c3c6fd281c101b28413c)
This commit is contained in:

committed by
Qstick

parent
1b83459927
commit
18189d086b
@@ -6,6 +6,7 @@ namespace NzbDrone.Core.Backup
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public BackupType Type { get; set; }
|
||||
public long Size { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -109,6 +109,7 @@ namespace NzbDrone.Core.Backup
|
||||
{
|
||||
Name = Path.GetFileName(b),
|
||||
Type = backupType,
|
||||
Size = _diskProvider.GetFileSize(b),
|
||||
Time = _diskProvider.FileGetLastWrite(b)
|
||||
}));
|
||||
}
|
||||
|
@@ -42,6 +42,7 @@ namespace Prowlarr.Api.V1.System.Backup
|
||||
Name = b.Name,
|
||||
Path = $"/backup/{b.Type.ToString().ToLower()}/{b.Name}",
|
||||
Type = b.Type,
|
||||
Size = b.Size,
|
||||
Time = b.Time
|
||||
})
|
||||
.OrderByDescending(b => b.Time)
|
||||
|
@@ -9,6 +9,7 @@ namespace Prowlarr.Api.V1.System.Backup
|
||||
public string Name { get; set; }
|
||||
public string Path { get; set; }
|
||||
public BackupType Type { get; set; }
|
||||
public long Size { get; set; }
|
||||
public DateTime Time { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user