You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow multiple albums in --album-locked option (#185)
* Initial plan
* Implement multiple album locking support
Co-authored-by: lstein <[email protected]>
* Update documentation for multiple album locking
Co-authored-by: lstein <[email protected]>
* Refactor album lock logic to use helper function
Co-authored-by: lstein <[email protected]>
* Add validation for locked album keys at startup
- Validate that all albums specified in --album-locked exist in configuration
- Exit with error code 1 and helpful message if invalid albums are specified
- Exit with error code 1 if no albums are configured but --album-locked is used
- Add test for validation logic
Co-authored-by: lstein <[email protected]>
* Improve validation test to be more meaningful
Co-authored-by: lstein <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: lstein <[email protected]>
Copy file name to clipboardExpand all lines: docs/user-guide/configuration.md
+37-2Lines changed: 37 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,14 +29,49 @@ On Windows systems, setting environment variables can be done through the GUI as
29
29
30
30
## Limiting the Available Albums
31
31
32
-
You may wish to expose an instance of PhotoMapAI that only shows a subset of albums. To do this, run `start_photomap` with `--album-locked list,of,albums`. Use the album key(s) to select which albums to display, separating the keys with commas. Only these albums will then be available to users of the web application.
32
+
You may wish to expose an instance of PhotoMapAI that only shows a subset of albums. To do this, run `start_photomap` with the `--album-locked` option followed by one or more album keys separated by spaces.
33
+
34
+
### Single Album Lock
35
+
36
+
To lock PhotoMapAI to a single album, provide a single album key:
37
+
38
+
```bash
39
+
start_photomap --album-locked my_album
40
+
```
41
+
42
+
When a single album is locked:
43
+
- The album selection dropdown disappears from the settings dialog
44
+
- Only the locked album is accessible
45
+
- All album management features (adding, editing, deleting albums) are disabled
46
+
- File system operations (browsing directories, creating folders) are disabled
47
+
- The favorites export function is disabled
48
+
49
+
### Multiple Album Lock
50
+
51
+
To lock PhotoMapAI to multiple albums, provide multiple album keys separated by spaces:
- The album selection dropdown appears in the settings dialog showing only the locked albums
59
+
- Users can switch between the locked albums
60
+
- The "Manage Albums" button remains hidden
61
+
- All album management features remain disabled
62
+
- File system operations remain disabled
63
+
- The favorites export function remains disabled
64
+
65
+
### Using URL Parameters
33
66
34
67
It may also be handy to pair this with a specific URL that starts PhotoMapAI with a specific album. The format to start with an album named "my_album" is:
35
68
36
69
```bash
37
-
http://your.photomap.host/:8050?album=my_album
70
+
http://your.photomap.host:8050?album=my_album
38
71
```
39
72
73
+
When using multiple locked albums, the URL parameter allows users to select which of the locked albums to view initially. If the album specified in the URL is not in the locked list, the first locked album will be used instead.
0 commit comments