mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
show notifications on background backup errors (#496)
* show notifications on background backup errors * settings page to configure (background backup error) notifications * persist time since failed background backup * fix darkmode slider color
This commit is contained in:
committed by
GitHub
parent
c436c57cc9
commit
3125d04f32
@@ -41,21 +41,8 @@ class BackupService {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns all assets to backup from the backup info taking into account the
|
||||
/// time of the last successfull backup per album
|
||||
Future<List<AssetEntity>> getAssetsToBackup(
|
||||
HiveBackupAlbums backupAlbumInfo,
|
||||
) async {
|
||||
final List<AssetEntity> candidates =
|
||||
await _buildUploadCandidates(backupAlbumInfo);
|
||||
|
||||
final List<AssetEntity> toUpload = candidates.isEmpty
|
||||
? []
|
||||
: await _removeAlreadyUploadedAssets(candidates);
|
||||
return toUpload;
|
||||
}
|
||||
|
||||
Future<List<AssetEntity>> _buildUploadCandidates(
|
||||
/// Returns all assets newer than the last successful backup per album
|
||||
Future<List<AssetEntity>> buildUploadCandidates(
|
||||
HiveBackupAlbums backupAlbums,
|
||||
) async {
|
||||
final filter = FilterOptionGroup(
|
||||
@@ -147,7 +134,8 @@ class BackupService {
|
||||
return result;
|
||||
}
|
||||
|
||||
Future<List<AssetEntity>> _removeAlreadyUploadedAssets(
|
||||
/// Returns a new list of assets not yet uploaded
|
||||
Future<List<AssetEntity>> removeAlreadyUploadedAssets(
|
||||
List<AssetEntity> candidates,
|
||||
) async {
|
||||
final String deviceId = Hive.box(userInfoBox).get(deviceIdKey);
|
||||
|
||||
Reference in New Issue
Block a user