feat(web,server): run jobs for specific assets (#3712)

* feat(web,server): manually queue asset job

* chore: open api

* chore: tests
This commit is contained in:
Jason Rasmussen 2023-08-18 10:31:48 -04:00 committed by GitHub
parent 66490d5db4
commit 5e901e4d21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 896 additions and 18 deletions

View file

@ -3,6 +3,7 @@ import {
APIKeyApi,
AssetApi,
AssetApiFp,
AssetJobName,
AuthenticationApi,
Configuration,
ConfigurationParameters,
@ -120,6 +121,26 @@ export class ImmichApi {
return names[jobName];
}
public getAssetJobName(job: AssetJobName) {
const names: Record<AssetJobName, string> = {
[AssetJobName.RefreshMetadata]: 'Refresh metadata',
[AssetJobName.RegenerateThumbnail]: 'Refresh thumbnails',
[AssetJobName.TranscodeVideo]: 'Refresh encoded videos',
};
return names[job];
}
public getAssetJobMessage(job: AssetJobName) {
const messages: Record<AssetJobName, string> = {
[AssetJobName.RefreshMetadata]: 'Refreshing metadata',
[AssetJobName.RegenerateThumbnail]: `Regenerating thumbnails`,
[AssetJobName.TranscodeVideo]: `Refreshing encoded video`,
};
return messages[job];
}
}
export const api = new ImmichApi({ basePath: '/api' });