diff --git a/frontend/src/System/Backup/BackupRow.js b/frontend/src/System/Backup/BackupRow.js
index 2f454a4b3..63a38f459 100644
--- a/frontend/src/System/Backup/BackupRow.js
+++ b/frontend/src/System/Backup/BackupRow.js
@@ -8,6 +8,7 @@ import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellCo
import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableRow from 'Components/Table/TableRow';
import { icons, kinds } from 'Helpers/Props';
+import formatBytes from 'Utilities/Number/formatBytes';
import translate from 'Utilities/String/translate';
import RestoreBackupModalConnector from './RestoreBackupModalConnector';
import styles from './BackupRow.css';
@@ -65,6 +66,7 @@ class BackupRow extends Component {
type,
name,
path,
+ size,
time
} = this.props;
@@ -104,6 +106,10 @@ class BackupRow extends Component {
+
+ {formatBytes(size)}
+
+
@@ -147,6 +153,7 @@ BackupRow.propTypes = {
type: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
path: PropTypes.string.isRequired,
+ size: PropTypes.number.isRequired,
time: PropTypes.string.isRequired,
onDeleteBackupPress: PropTypes.func.isRequired
};
diff --git a/frontend/src/System/Backup/Backups.js b/frontend/src/System/Backup/Backups.js
index f65010875..83d961e71 100644
--- a/frontend/src/System/Backup/Backups.js
+++ b/frontend/src/System/Backup/Backups.js
@@ -23,6 +23,11 @@ const columns = [
label: translate('Name'),
isVisible: true
},
+ {
+ name: 'size',
+ label: 'Size',
+ isVisible: true
+ },
{
name: 'time',
label: translate('Time'),
@@ -127,6 +132,7 @@ class Backups extends Component {
type,
name,
path,
+ size,
time
} = item;
@@ -137,6 +143,7 @@ class Backups extends Component {
type={type}
name={name}
path={path}
+ size={size}
time={time}
onDeleteBackupPress={onDeleteBackupPress}
/>
diff --git a/src/NzbDrone.Core/Backup/Backup.cs b/src/NzbDrone.Core/Backup/Backup.cs
index 5d148648e..4c6200436 100644
--- a/src/NzbDrone.Core/Backup/Backup.cs
+++ b/src/NzbDrone.Core/Backup/Backup.cs
@@ -6,6 +6,7 @@ public class Backup
{
public string Name { get; set; }
public BackupType Type { get; set; }
+ public long Size { get; set; }
public DateTime Time { get; set; }
}
}
diff --git a/src/NzbDrone.Core/Backup/BackupService.cs b/src/NzbDrone.Core/Backup/BackupService.cs
index f19d83d33..a8ce6d6ed 100644
--- a/src/NzbDrone.Core/Backup/BackupService.cs
+++ b/src/NzbDrone.Core/Backup/BackupService.cs
@@ -107,6 +107,7 @@ public List GetBackups()
{
Name = Path.GetFileName(b),
Type = backupType,
+ Size = _diskProvider.GetFileSize(b),
Time = _diskProvider.FileGetLastWrite(b)
}));
}
diff --git a/src/Radarr.Api.V3/System/Backup/BackupController.cs b/src/Radarr.Api.V3/System/Backup/BackupController.cs
index d972c8847..0cd95ab22 100644
--- a/src/Radarr.Api.V3/System/Backup/BackupController.cs
+++ b/src/Radarr.Api.V3/System/Backup/BackupController.cs
@@ -42,6 +42,7 @@ public List GetBackupFiles()
Name = b.Name,
Path = $"/backup/{b.Type.ToString().ToLower()}/{b.Name}",
Type = b.Type,
+ Size = b.Size,
Time = b.Time
})
.OrderByDescending(b => b.Time)
diff --git a/src/Radarr.Api.V3/System/Backup/BackupResource.cs b/src/Radarr.Api.V3/System/Backup/BackupResource.cs
index 605e5fb98..45b64d7b4 100644
--- a/src/Radarr.Api.V3/System/Backup/BackupResource.cs
+++ b/src/Radarr.Api.V3/System/Backup/BackupResource.cs
@@ -9,6 +9,7 @@ public class BackupResource : RestResource
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; }
}
}