# Changelog (develop) ## 2026-05-10 — Released as v0.1.6 ## 2026-05-10 - Replaced `build-and-push.sh` with shared version from `shared-integrations/tooling/docker-build-and-push/`; reads release version from `docs/changelog.md` heading instead of `version.txt`. No more git operations from the script — commit and tag manually. - Removed obsolete `version.txt`, `.last-branch`, and `.gitignore` (only ignored `version.txt`). - Stack: image tag now configurable via `SLEEP_MEDITATION_IMAGE_TAG` in `sleep-meditation.env` (was hardcoded `:dev`); host ports already from env, container ports kept hardcoded since they're application-fixed. - Downloader: added YouTube support via `yt-dlp` + `ffmpeg` (added to Dockerfile). YouTube URLs detected by hostname (`youtube.com`, `youtu.be`, `music.youtube.com`, `m.youtube.com`); downloaded as best audio, transcoded to mp3 at highest quality. - Downloader: direct (non-YouTube) downloads now validate `Content-Type` (must be `audio/*` or `application/ogg`); unsupported responses (e.g. HTML pages) are rejected with a clear error instead of silently saving a broken mp3. - Downloader: title field now optional. For YouTube URLs without a title, the API fetches the video title via `yt-dlp --get-title` and uses it as the filename. - Downloader: progress tracking. yt-dlp uses `progress_hooks` to report download/convert phase; direct downloads track bytes vs `Content-Length`. `/api/download/status` returns `progress` (0–100) and `phase`. UI shows a `` bar and `Downloading 42%…` / `Converting…` status; poll interval reduced from 2000 ms to 750 ms. - Downloader: source URL stored per file in `sources.json`; `/api/downloads` returns `source`. Manage list shows a "Source" link (new tab) next to each track for revisiting the origin. Cleanup on delete and on download failure. ## 2026-04-09 - Added skip-intro offset per downloaded track, configurable in the downloader UI. - Skip offset stored in `downloads/skip.json`; `GET /api/downloads` returns `skip` field. - Sleep app seeks to skip offset after `loadedmetadata` when playing a downloaded track. ## 2026-04-09 — Released as v0.1.5 ## 2026-04-09 - Split download management into a separate internal container (`sleep-meditation-downloader`). - Public `sleep-meditation` container is now read-only: no write API endpoints exposed. - `sleep-meditation-downloader` provides a management UI and full write API (download, rename, delete). - Both containers share the same host mp3 volume. - Downloader port bound to all interfaces (local network only, not publicly exposed). - Added refresh button (↺) in the app header for home screen bookmark users without a browser refresh. - Fixed download list spacing: track rows now have a gap between them. - Build script: added `:latest` tag on release builds; fixed `git add -f` for ignored `version.txt`. ## 2026-04-09 — Released as v0.1.4 ## 2026-04-09 - Added server-side audio download via URL (avoids browser timeout on long files). - Downloaded tracks stored in `mp3/downloads/` subdirectory of the existing mp3 volume. - Downloaded tracks played individually on the main page (no auto-advance after end). - Display titles stored separately in `titles.json`; special characters (`:`, `|`, etc.) preserved. - Added Settings page (hash routing `#settings`) with: download form, track rename, manage downloads. - Track titles for playlist tracks editable via Settings; updates written to `playlist.json`. - Removed example fallback track. - Container extended with Python 3 + Flask API (`api.py`) and supervisord alongside Nginx. - Fixed mobile layout: changed `body` and `.card` from CSS Grid to Flexbox for correct iPhone rendering. ## 2026-03-22 - Initial repository created using the `story-grabber` layout. - Added `sleep-meditation` container (Nginx + static player). - Implemented web player with playlist support, audio controls, and Media Session API. - Added stack files for Portainer deployment. - Added README and technical documentation. - Added auto-discovery of audio files from `/mp3/` when `playlist.json` is not present. - Fixed relative URL parsing for tracks from Nginx `/mp3/` directory listing. - Changed playlist end behavior: stop at last track (no loop). - Added `Back to start` control to reset to first track without autoplay. - Translated user-facing UI text and project documentation to English.