mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
docs: Add conditional album storage template information (#12218)
This commit is contained in:
parent
b0af9be513
commit
649897f737
3 changed files with 8 additions and 0 deletions
|
@ -27,3 +27,9 @@ If an asset is in multiple albums, `{{album}}` will be set to the name of the al
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Immich also provides a mechanism to migrate between templates so that if the template you set now doesn't work in the future, you can always migrate all the existing files to the new template. The mechanism is run as a job on the Job page.
|
Immich also provides a mechanism to migrate between templates so that if the template you set now doesn't work in the future, you can always migrate all the existing files to the new template. The mechanism is run as a job on the Job page.
|
||||||
|
|
||||||
|
If you want to store assets in album folders, but you also have assets that do not belong to any album, you can use `{{#if album}}`, `{{else}}` and `{{/if}}` to create a conditional statement. For example, the following template will store assets in album folders if they belong to an album, and in a folder named "Other/Month" if they do not belong to an album:
|
||||||
|
|
||||||
|
```
|
||||||
|
{{y}}/{{#if album}}{{album}}{{else}}Other/{{MM}}{{/if}}/{{filename}}
|
||||||
|
```
|
||||||
|
|
|
@ -75,6 +75,7 @@ export const supportedPresetTokens = [
|
||||||
'{{y}}/{{MM}}-{{dd}}/{{filename}}',
|
'{{y}}/{{MM}}-{{dd}}/{{filename}}',
|
||||||
'{{y}}/{{MMMM}}-{{dd}}/{{filename}}',
|
'{{y}}/{{MMMM}}-{{dd}}/{{filename}}',
|
||||||
'{{y}}/{{MM}}/{{filename}}',
|
'{{y}}/{{MM}}/{{filename}}',
|
||||||
|
'{{y}}/{{#if album}}{{album}}{{else}}Other/{{MM}}{{/if}}/{{filename}}',
|
||||||
'{{y}}/{{MMM}}/{{filename}}',
|
'{{y}}/{{MMM}}/{{filename}}',
|
||||||
'{{y}}/{{MMMM}}/{{filename}}',
|
'{{y}}/{{MMMM}}/{{filename}}',
|
||||||
'{{y}}/{{MM}}/{{dd}}/{{filename}}',
|
'{{y}}/{{MM}}/{{dd}}/{{filename}}',
|
||||||
|
|
|
@ -336,6 +336,7 @@ describe(SystemConfigService.name, () => {
|
||||||
'{{y}}/{{MM}}-{{dd}}/{{filename}}',
|
'{{y}}/{{MM}}-{{dd}}/{{filename}}',
|
||||||
'{{y}}/{{MMMM}}-{{dd}}/{{filename}}',
|
'{{y}}/{{MMMM}}-{{dd}}/{{filename}}',
|
||||||
'{{y}}/{{MM}}/{{filename}}',
|
'{{y}}/{{MM}}/{{filename}}',
|
||||||
|
'{{y}}/{{#if album}}{{album}}{{else}}Other/{{MM}}{{/if}}/{{filename}}',
|
||||||
'{{y}}/{{MMM}}/{{filename}}',
|
'{{y}}/{{MMM}}/{{filename}}',
|
||||||
'{{y}}/{{MMMM}}/{{filename}}',
|
'{{y}}/{{MMMM}}/{{filename}}',
|
||||||
'{{y}}/{{MM}}/{{dd}}/{{filename}}',
|
'{{y}}/{{MM}}/{{dd}}/{{filename}}',
|
||||||
|
|
Loading…
Reference in a new issue