mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(server): read-write external assets (#9235)
* refactor: remove isReadOnly and isExternal usages * chore: open api * fix: linting * remove mobile isReadOnly dependency --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
d26ac431b8
commit
5b87abb021
57 changed files with 181 additions and 603 deletions
|
|
@ -71,19 +71,6 @@ extension AssetListExtension on Iterable<Asset> {
|
|||
return this;
|
||||
}
|
||||
|
||||
/// Returns the assets that are present on a file system which has write permission
|
||||
/// This filters out assets on readOnly external library to which we cannot perform any write operation
|
||||
Iterable<Asset> writableOnly({
|
||||
void Function()? errorCallback,
|
||||
}) {
|
||||
final bool onlyWritable = every((e) => !e.isReadOnly);
|
||||
if (!onlyWritable) {
|
||||
if (errorCallback != null) errorCallback();
|
||||
return where((a) => !a.isReadOnly);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/// Filters out offline assets and returns those that are still accessible by the Immich server
|
||||
Iterable<Asset> nonOfflineOnly({
|
||||
void Function()? errorCallback,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue