mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
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:
parent
66490d5db4
commit
5e901e4d21
26 changed files with 896 additions and 18 deletions
|
|
@ -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' });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue