The overlay was pinning a specific commit via fetchFromGitea, requiring
manual hash updates every time the fork changed. Now uses self.outPath
which points to the flake's own source — the consuming repo's flake.lock
tracks the rev and hash automatically.
The /api/v1/media endpoint was loading ALL media items from the database
with no pagination, causing timeouts with large libraries (1800+ items
per source). Now supports:
- ?limit=N (default 50)
- ?offset=N (default 0)
- ?downloaded=true (filter to only downloaded media)
- Ordered by uploaded_at desc
The token was only shown masked (first 12 chars + bullets) with no
way to see or copy the full value. Added:
- Show/Hide toggle to reveal the full token
- Copy button that writes the token to clipboard
Both use Alpine.js (already used in the template).
BREAKING CHANGE: API authentication is now always required. The
PINCHFLAT_API_TOKEN env var is no longer used. Instead, tokens are
stored in the database and managed via Settings → API Access.
Changes:
- Add api_token column to settings table (migration)
- ApiAuthPlug reads from DB; returns 401 if no token configured
- Add API Access section to Settings page with generate/regenerate/revoke
- Add POST /settings/generate_api_token and /settings/revoke_api_token
- Remove api_token from config.exs and runtime.exs
- Update all API controller tests to set auth token in setup
- Update auth plug tests for mandatory authentication
- 1008 tests pass, zero warnings
Checks that the flake evaluates, and verifies the source, mixFodDeps,
and yarnOfflineCache hashes are correct. Does not do a full nix build
(which would be too slow for CI) — the hash checks catch the most
common issues before merging to config-nixos.
The overlay overrides pkgs.pinchflat to build from this fork (with REST
API) instead of upstream kieraneglin/pinchflat. Consumed by config-nixos
as a flake input: pinchflat.overlays.default
Replace build-push-action with docker compose build --no-cache to
ensure the image always contains the latest code. Remove buildx action
since we don't need it anymore.
The type=gha cache was serving stale COPY layers, so the Docker image
contained old code even after pushes. Removing cache-from/cache-to
forces a fresh build every time.
- Remove unused aliases that caused warnings-as-errors in EX_CHECK mode
- Run mix format to fix formatter check
- Add root-level yarn install to CI for prettier (used by mix check)
- All 1007 tests pass, zero warnings
The docker-compose.ci.yml mounted '.:/app' which works on GitHub Actions
(where the workspace is the repo root) but not on Gitea Actions (where
the workspace path differs). The built Docker image already has all files
from COPY . ./ so the volume mount is unnecessary for CI.
Also moved yarn install inside the container and run full test suite.
- Add FallbackController for proper 404 JSON responses on missing resources
- Add non-bang get_source/1 and get_media_item/1 for safe lookups
- Fix Task JSON encoder: remove Repo.preload call (not available in encoder scope),
handle NotLoaded associations by returning nil
- Fix media item index: use list_media_items_for_source/1 instead of
list_pending_media_items_for/1 which had overly restrictive filtering
- Add missing extras_directory to test config
- All 1007 tests pass
- Add /api/v1 namespace with Bearer token auth (PINCHFLAT_API_TOKEN env var)
- API controllers for sources, media items, media profiles, settings, tasks
- Support for all source actions: create, update, delete, force_download_pending,
force_redownload, force_index, force_metadata_refresh, sync_files_on_disk
- Media item endpoints: list, show, search, force_download, update, delete
- Media profile CRUD endpoints
- Settings show/update and app_info endpoints
- Task listing endpoints
- Add Jason.Encoder for Task schema
- Comprehensive test suite for all API endpoints
- Gitea Actions CI workflow (runs existing checks + API-specific tests)
- API documentation in docs/API.md
Consolidate the home page UI by moving Active Tasks from a separate
section into a third tab alongside Downloaded and Pending tabs.
Co-authored-by: Daniel <ddacunha@MacBook-Pro-14.local>
* Added Deno to Dockerfiles
* Updated yt-dlp source
* Added unzip
* Update deno directory
* The ACTUAL deno install path this time. Christ, am I new here?
* Linting
* Bumped Elixir
* Silenced mix check warnings
* Updated all deps with minor version upgrades
* Updated more deps; Refactored text components to work with phoenix_html updates
* README: add podman
Docker always has a tendency to get in my way on Debian. Also, I really
like the userns setup for podman for giving permissions between host and
container.
* Ran linting on README
---------
Co-authored-by: Kieran Eglin <kieran.eglin@gmail.com>
* Sources that use cookies when_needed now retry downloads if we think it'd help
* tweaked error message we're checking on to match media_download_worker
* Added last_error to media item table
* Error messages are now persisted to the last_error field
* Minor layout updates
* Added help tooltip to source content view
* Added error information to homepage tables
* Remove unneeded index
* Added docs to tooltip component