Compare commits
3 Commits
v2.0.0
...
fix/sync-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f1ec5b724 | ||
|
|
00ce6354f0 | ||
|
|
9b938d8954 |
2
.github/.nvmrc
vendored
2
.github/.nvmrc
vendored
@@ -1 +1 @@
|
|||||||
22.19.0
|
22.20.0
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.19.0
|
22.20.0
|
||||||
|
|||||||
@@ -68,6 +68,6 @@
|
|||||||
"micromatch": "^4.0.8"
|
"micromatch": "^4.0.8"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "22.19.0"
|
"node": "22.20.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.19.0
|
22.20.0
|
||||||
|
|||||||
32
docs/docs/install/one-click.md
Normal file
32
docs/docs/install/one-click.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 65
|
||||||
|
---
|
||||||
|
|
||||||
|
# One-Click [Cloud Service]
|
||||||
|
|
||||||
|
:::note
|
||||||
|
This version of Immich is provided via cloud service provider's one-click marketplaces. Hosting costs are set by the cloud service providers.
|
||||||
|
Support for these are provided by the individual cloud service providers.
|
||||||
|
|
||||||
|
**Please report issues to the corresponding [Github Repository][github].**
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Simply goto the providers marketplace and choose Immich, then follow the provided instructions.
|
||||||
|
|
||||||
|
## One-Click Immich marketplace providers
|
||||||
|
|
||||||
|
### DigitalOcean
|
||||||
|
|
||||||
|
https://marketplace.digitalocean.com/apps/immich
|
||||||
|
|
||||||
|
### Vultr
|
||||||
|
|
||||||
|
https://www.vultr.com/marketplace/apps/immich
|
||||||
|
|
||||||
|
## Issues
|
||||||
|
|
||||||
|
For issues, open an issue on the associated [GitHub Repository][github].
|
||||||
|
|
||||||
|
[github]: https://github.com/imagegenius/docker-immich/
|
||||||
@@ -57,6 +57,6 @@
|
|||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "22.19.0"
|
"node": "22.20.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.19.0
|
22.20.0
|
||||||
|
|||||||
@@ -52,6 +52,6 @@
|
|||||||
"vitest": "^3.0.0"
|
"vitest": "^3.0.0"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "22.19.0"
|
"node": "22.20.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[tools]
|
[tools]
|
||||||
node = "22.19.0"
|
node = "22.20.0"
|
||||||
flutter = "3.35.4"
|
flutter = "3.35.4"
|
||||||
pnpm = "10.15.1"
|
pnpm = "10.15.1"
|
||||||
|
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ class SyncStreamService {
|
|||||||
// to acknowledge that the client has processed all the backfill events
|
// to acknowledge that the client has processed all the backfill events
|
||||||
case SyncEntityType.syncAckV1:
|
case SyncEntityType.syncAckV1:
|
||||||
return;
|
return;
|
||||||
// No-op. SyncCompleteV1 is used to signal the completion of the sync process
|
// SyncCompleteV1 is used to signal the completion of the sync process. Cleanup stale assets and signal completion
|
||||||
case SyncEntityType.syncCompleteV1:
|
case SyncEntityType.syncCompleteV1:
|
||||||
return;
|
return _syncStreamRepository.pruneAssets();
|
||||||
// Request to reset the client state. Clear everything related to remote entities
|
// Request to reset the client state. Clear everything related to remote entities
|
||||||
case SyncEntityType.syncResetV1:
|
case SyncEntityType.syncResetV1:
|
||||||
return _syncStreamRepository.reset();
|
return _syncStreamRepository.reset();
|
||||||
|
|||||||
@@ -591,6 +591,40 @@ class SyncStreamRepository extends DriftDatabaseRepository {
|
|||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> pruneAssets() async {
|
||||||
|
try {
|
||||||
|
await _db.transaction(() async {
|
||||||
|
final authQuery = _db.authUserEntity.selectOnly()
|
||||||
|
..addColumns([_db.authUserEntity.id])
|
||||||
|
..limit(1);
|
||||||
|
final currentUserId = await authQuery.map((row) => row.read(_db.authUserEntity.id)).getSingleOrNull();
|
||||||
|
if (currentUserId == null) {
|
||||||
|
_logger.warning('No authenticated user found during pruneAssets. Skipping asset pruning.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final partnerQuery = _db.partnerEntity.selectOnly()
|
||||||
|
..addColumns([_db.partnerEntity.sharedById])
|
||||||
|
..where(_db.partnerEntity.sharedWithId.equals(currentUserId));
|
||||||
|
final partnerIds = await partnerQuery.map((row) => row.read(_db.partnerEntity.sharedById)).get();
|
||||||
|
|
||||||
|
final validUsers = {currentUserId, ...partnerIds.nonNulls};
|
||||||
|
|
||||||
|
// Asset is not owned by the current user or any of their partners and is not part of any (shared) album
|
||||||
|
// Likely a stale asset that was previously shared but has been removed
|
||||||
|
await _db.remoteAssetEntity.deleteWhere((asset) {
|
||||||
|
return asset.ownerId.isNotIn(validUsers) &
|
||||||
|
asset.id.isNotInQuery(
|
||||||
|
_db.remoteAlbumAssetEntity.selectOnly()..addColumns([_db.remoteAlbumAssetEntity.assetId]),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} catch (error, stack) {
|
||||||
|
_logger.severe('Error: pruneAssets', error, stack);
|
||||||
|
// We do not rethrow here as this is a client-only cleanup and should not affect the sync process
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension on AssetTypeEnum {
|
extension on AssetTypeEnum {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.19.0
|
22.20.0
|
||||||
|
|||||||
@@ -28,6 +28,6 @@
|
|||||||
"directory": "open-api/typescript-sdk"
|
"directory": "open-api/typescript-sdk"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "22.19.0"
|
"node": "22.20.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.19.0
|
22.20.0
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
"vitest": "^3.0.0"
|
"vitest": "^3.0.0"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "22.19.0"
|
"node": "22.20.0"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"sharp": "^0.34.3"
|
"sharp": "^0.34.3"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.19.0
|
22.20.0
|
||||||
|
|||||||
@@ -107,6 +107,6 @@
|
|||||||
"vitest": "^3.0.0"
|
"vitest": "^3.0.0"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "22.19.0"
|
"node": "22.20.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user