forked from Cutlery/immich
Merge branch 'main' of https://github.com/immich-app/immich into feat/offline-files-job
This commit is contained in:
commit
68a49258cb
4
.github/workflows/cli.yml
vendored
4
.github/workflows/cli.yml
vendored
@ -58,7 +58,7 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3.0.0
|
uses: docker/setup-qemu-action@v3.0.0
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.1.0
|
uses: docker/setup-buildx-action@v3.2.0
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -87,7 +87,7 @@ jobs:
|
|||||||
type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }}
|
type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v5.2.0
|
uses: docker/build-push-action@v5.3.0
|
||||||
with:
|
with:
|
||||||
file: cli/Dockerfile
|
file: cli/Dockerfile
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@ -66,7 +66,7 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3.0.0
|
uses: docker/setup-qemu-action@v3.0.0
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.1.0
|
uses: docker/setup-buildx-action@v3.2.0
|
||||||
# Workaround to fix error:
|
# Workaround to fix error:
|
||||||
# failed to push: failed to copy: io: read/write on closed pipe
|
# failed to push: failed to copy: io: read/write on closed pipe
|
||||||
# See https://github.com/docker/build-push-action/issues/761
|
# See https://github.com/docker/build-push-action/issues/761
|
||||||
@ -121,7 +121,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v5.2.0
|
uses: docker/build-push-action@v5.3.0
|
||||||
with:
|
with:
|
||||||
context: ${{ matrix.context }}
|
context: ${{ matrix.context }}
|
||||||
file: ${{ matrix.file }}
|
file: ${{ matrix.file }}
|
||||||
|
@ -211,8 +211,8 @@ class AlbumViewerAppbar extends HookConsumerWidget
|
|||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(top: 24.0),
|
padding: const EdgeInsets.only(top: 24.0),
|
||||||
child: Column(
|
child: ListView(
|
||||||
mainAxisSize: MainAxisSize.min,
|
shrinkWrap: true,
|
||||||
children: [
|
children: [
|
||||||
...buildBottomSheetActions(),
|
...buildBottomSheetActions(),
|
||||||
if (onAddPhotos != null) ...commonActions,
|
if (onAddPhotos != null) ...commonActions,
|
||||||
|
@ -142,6 +142,7 @@ class AlbumOptionsPage extends HookConsumerWidget {
|
|||||||
|
|
||||||
buildSharedUsersList() {
|
buildSharedUsersList() {
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
|
primary: false,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemCount: sharedUsers.value.length,
|
itemCount: sharedUsers.value.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
@ -188,9 +189,7 @@ class AlbumOptionsPage extends HookConsumerWidget {
|
|||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
title: Text("translated_text_options".tr()),
|
title: Text("translated_text_options".tr()),
|
||||||
),
|
),
|
||||||
body: Column(
|
body: ListView(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
if (isOwner && album.shared)
|
if (isOwner && album.shared)
|
||||||
SwitchListTile.adaptive(
|
SwitchListTile.adaptive(
|
||||||
|
@ -63,8 +63,7 @@ class SelectAdditionalUserForSharingPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Column(
|
return ListView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Wrap(
|
Wrap(
|
||||||
children: [...usersChip],
|
children: [...usersChip],
|
||||||
@ -81,6 +80,7 @@ class SelectAdditionalUserForSharingPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
|
primary: false,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemBuilder: ((context, index) {
|
itemBuilder: ((context, index) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
@ -90,8 +90,7 @@ class SelectUserForSharingPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Column(
|
return ListView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Wrap(
|
Wrap(
|
||||||
children: [...usersChip],
|
children: [...usersChip],
|
||||||
@ -108,6 +107,7 @@ class SelectUserForSharingPage extends HookConsumerWidget {
|
|||||||
).tr(),
|
).tr(),
|
||||||
),
|
),
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
|
primary: false,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemBuilder: ((context, index) {
|
itemBuilder: ((context, index) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
|
@ -428,10 +428,8 @@ class SharedLinkEditPage extends HookConsumerWidget {
|
|||||||
leading: const CloseButton(),
|
leading: const CloseButton(),
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
),
|
),
|
||||||
resizeToAvoidBottomInset: false,
|
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(
|
child: ListView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(padding),
|
padding: const EdgeInsets.all(padding),
|
||||||
@ -487,7 +485,10 @@ class SharedLinkEditPage extends HookConsumerWidget {
|
|||||||
Align(
|
Align(
|
||||||
alignment: Alignment.bottomRight,
|
alignment: Alignment.bottomRight,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(right: padding + 10),
|
padding: const EdgeInsets.only(
|
||||||
|
right: padding + 10,
|
||||||
|
bottom: padding,
|
||||||
|
),
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed:
|
onPressed:
|
||||||
existingLink != null ? handleEditLink : handleNewLink,
|
existingLink != null ? handleEditLink : handleNewLink,
|
||||||
@ -508,6 +509,7 @@ class SharedLinkEditPage extends HookConsumerWidget {
|
|||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: padding,
|
left: padding,
|
||||||
right: padding,
|
right: padding,
|
||||||
|
bottom: padding,
|
||||||
),
|
),
|
||||||
child: buildNewLinkField(),
|
child: buildNewLinkField(),
|
||||||
),
|
),
|
||||||
|
@ -299,17 +299,26 @@ export class LibraryService extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async scanAssets(libraryId: string, assetPaths: string[], ownerId: string, force = false) {
|
private async scanAssets(libraryId: string, assetPaths: string[], ownerId: string, force = false) {
|
||||||
await this.jobRepository.queueAll(
|
this.logger.verbose(`Queuing refresh of ${assetPaths.length} asset(s)`);
|
||||||
assetPaths.map((assetPath) => ({
|
|
||||||
name: JobName.LIBRARY_SCAN_ASSET,
|
// We perform this in batches to save on memory when performing large refreshes (greater than 1M assets)
|
||||||
data: {
|
const batchSize = 5000;
|
||||||
id: libraryId,
|
for (let i = 0; i < assetPaths.length; i += batchSize) {
|
||||||
assetPath: path.normalize(assetPath),
|
const batch = assetPaths.slice(i, i + batchSize);
|
||||||
ownerId,
|
await this.jobRepository.queueAll(
|
||||||
force,
|
batch.map((assetPath) => ({
|
||||||
},
|
name: JobName.LIBRARY_SCAN_ASSET,
|
||||||
})),
|
data: {
|
||||||
);
|
id: libraryId,
|
||||||
|
assetPath: assetPath,
|
||||||
|
ownerId,
|
||||||
|
force,
|
||||||
|
},
|
||||||
|
})),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.logger.debug('Asset refresh queue completed');
|
||||||
}
|
}
|
||||||
|
|
||||||
private async validateImportPath(importPath: string): Promise<ValidateLibraryImportPathResponseDto> {
|
private async validateImportPath(importPath: string): Promise<ValidateLibraryImportPathResponseDto> {
|
||||||
@ -664,7 +673,7 @@ export class LibraryService extends EventEmitter {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.verbose(`Refreshing library: ${job.id}`);
|
this.logger.log(`Refreshing library: ${job.id}`);
|
||||||
|
|
||||||
const pathValidation = await Promise.all(
|
const pathValidation = await Promise.all(
|
||||||
library.importPaths.map(async (importPath) => await this.validateImportPath(importPath)),
|
library.importPaths.map(async (importPath) => await this.validateImportPath(importPath)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user