diff --git a/server/app/static/widget_dialog_photos.js b/server/app/static/widget_dialog_photos.js index 81f6aae..39fc778 100644 --- a/server/app/static/widget_dialog_photos.js +++ b/server/app/static/widget_dialog_photos.js @@ -73,7 +73,12 @@ async function savePhotoSettings() { function initPhotosDialog() { document.getElementById('load-albums').addEventListener('click', async () => { try { - const resp = await fetch(`${window.FRAME_API}/albums`); + // /albums is frame-level (routers/api_frames.py) -- it lists the + // frame owner's whole Immich library, not something scoped to + // this one photo widget -- so it uses window.FRAME_BASE_API (the + // stable frame-level base), not window.FRAME_API (repointed to + // this widget's own API base while the dialog is open). + const resp = await fetch(`${window.FRAME_BASE_API}/albums`); if (!resp.ok) { throw new Error(await apiError(resp)); }