feat(server): Handle sidecars in external libraries (#14800)

* handle sidecars in external libraries

* don't add separate source
This commit is contained in:
Jonathan Jogenfors
2024-12-22 03:50:07 +01:00
committed by GitHub
parent 6080e6e827
commit 4bc2aa5451
5 changed files with 355 additions and 83 deletions
+8 -1
View File
@@ -698,7 +698,7 @@ export class MetadataService extends BaseService {
return JobStatus.FAILED;
}
if (!isSync && (!asset.isVisible || asset.sidecarPath)) {
if (!isSync && (!asset.isVisible || asset.sidecarPath) && !asset.isExternal) {
return JobStatus.FAILED;
}
@@ -720,6 +720,13 @@ export class MetadataService extends BaseService {
sidecarPath = sidecarPathWithoutExt;
}
if (asset.isExternal) {
if (sidecarPath !== asset.sidecarPath) {
await this.assetRepository.update({ id: asset.id, sidecarPath });
}
return JobStatus.SUCCESS;
}
if (sidecarPath) {
await this.assetRepository.update({ id: asset.id, sidecarPath });
return JobStatus.SUCCESS;