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:
Jason Rasmussen 2024-05-03 15:34:57 -04:00 committed by GitHub
parent d26ac431b8
commit 5b87abb021
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 181 additions and 603 deletions

View file

@ -368,7 +368,6 @@ describe(LibraryService.name, () => {
type: AssetType.IMAGE,
originalFileName: 'photo.jpg',
sidecarPath: null,
isReadOnly: true,
isExternal: true,
},
],
@ -416,7 +415,6 @@ describe(LibraryService.name, () => {
type: AssetType.IMAGE,
originalFileName: 'photo.jpg',
sidecarPath: '/data/user1/photo.jpg.xmp',
isReadOnly: true,
isExternal: true,
},
],
@ -463,7 +461,6 @@ describe(LibraryService.name, () => {
type: AssetType.VIDEO,
originalFileName: 'video.mp4',
sidecarPath: null,
isReadOnly: true,
isExternal: true,
},
],
@ -1458,10 +1455,7 @@ describe(LibraryService.name, () => {
await expect(sut.handleOfflineRemoval({ id: libraryStub.externalLibrary1.id })).resolves.toBe(JobStatus.SUCCESS);
expect(jobMock.queueAll).toHaveBeenCalledWith([
{
name: JobName.ASSET_DELETION,
data: { id: assetStub.image1.id, fromExternal: true },
},
{ name: JobName.ASSET_DELETION, data: { id: assetStub.image1.id } },
]);
});
});