412 Commits

Author SHA1 Message Date
hermes-agent 544c6ffc61 flake: use self.outPath instead of fetchFromGitea with hardcoded rev
Nix Flake Check / Nix Flake Check (push) Successful in 1m29s
Build and Test / Build and Test (push) Successful in 7m49s
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.
2026-07-12 09:38:57 +00:00
hermes-agent 4734e94f26 flake: update overlay rev to pagination fix (need correct hash)
Nix Flake Check / Nix Flake Check (push) Failing after 1m22s
Build and Test / Build and Test (push) Successful in 8m9s
2026-07-11 18:56:55 +00:00
hermes-agent a3b75771e1 fix: split long from() query to satisfy mix formatter
Nix Flake Check / Nix Flake Check (push) Successful in 1m28s
Build and Test / Build and Test (push) Successful in 7m31s
2026-07-09 08:25:04 +00:00
hermes-agent 5667ea67c3 fix: format Elixir code to pass mix formatter check
Nix Flake Check / Nix Flake Check (push) Successful in 1m33s
Build and Test / Build and Test (push) Failing after 7m46s
2026-07-09 06:43:19 +00:00
hermes-agent a2da433cdc api: add pagination (limit/offset) and downloaded filter to media endpoint
Nix Flake Check / Nix Flake Check (push) Successful in 1m34s
Build and Test / Build and Test (push) Failing after 7m49s
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
2026-07-08 21:54:39 +00:00
hermes-agent 75fb7dd9d8 Update flake.nix rev/hash to include copy button fix
Nix Flake Check / Nix Flake Check (push) Successful in 1m29s
Build and Test / Build and Test (push) Successful in 7m30s
Previous rev (5280baf) was the commit before the fix. Now points
to fc39a7d which has the data-token attribute fix.
2026-07-04 21:45:07 +00:00
hermes-agent fc39a7df6c Fix: copy button was storing literal template string
Nix Flake Check / Nix Flake Check (push) Successful in 1m30s
Build and Test / Build and Test (push) Successful in 7m42s
HEEX doesn't interpolate {} inside quoted attribute values.
Use data-token attribute + .dataset.token instead.
2026-07-04 18:06:54 +00:00
hermes-agent 049773ab34 Update flake rev/hash for reveal/copy token UI
Build and Test / Build and Test (push) Failing after 6m3s
Nix Flake Check / Nix Flake Check (push) Successful in 1m30s
2026-07-04 17:39:04 +00:00
hermes-agent 5280baf33d Add reveal/copy buttons for API token in settings UI
Nix Flake Check / Nix Flake Check (push) Successful in 1m51s
Build and Test / Build and Test (push) Successful in 8m30s
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).
2026-07-04 14:02:32 +00:00
hermes-agent 0e0fd20da7 Update flake.nix rev and hash for mandatory API auth commit
Build and Test / Build and Test (push) Failing after 5m53s
Nix Flake Check / Nix Flake Check (push) Successful in 1m29s
2026-07-04 11:52:33 +00:00
hermes-agent 75f75d8d19 Make API auth mandatory, manage tokens via web UI
Nix Flake Check / Nix Flake Check (push) Successful in 1m55s
Build and Test / Build and Test (push) Successful in 8m25s
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
2026-07-04 11:51:40 +00:00
hermes-agent 7ec48045ce Add Nix flake CI: eval check + hash verification
Build and Test / Build and Test (push) Successful in 2m6s
Nix Flake Check / Nix Flake Check (push) Successful in 1m32s
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.
2026-07-04 10:58:26 +00:00
hermes-agent 254b712747 Add flake.nix exporting overlay for custom pinchflat package
Build and Test / Build and Test (push) Failing after 6m55s
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
2026-07-04 10:54:44 +00:00
hermes-agent 8e0ec4b8b9 Format ci.yml and API.md with prettier
Build and Test / Build and Test (push) Successful in 8m8s
2026-07-04 10:12:11 +00:00
hermes-agent 517f3f0329 CI: use docker compose build --no-cache to prevent stale images
Build and Test / Build and Test (push) Failing after 7m34s
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.
2026-07-04 10:03:31 +00:00
hermes-agent 1d3bb1919b Disable Docker GHA cache to fix stale image builds in Gitea Actions
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 9m0s
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.
2026-07-04 09:52:27 +00:00
hermes-agent 5647e5642a Fix CI: remove unused aliases, run mix format, install root yarn deps
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 1m21s
- 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
2026-07-04 09:48:47 +00:00
hermes-agent a891cb8902 Fix CI for Gitea Actions: remove volume mount, run all commands in container
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 1m36s
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.
2026-07-04 09:42:10 +00:00
hermes-agent d111a3ffd5 Merge pull request 'Add JSON REST API for MCP integration' (#1) from feature/api into master
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 1m2s
Merge feature/api: Add REST API with Bearer token auth, fix all test failures
2026-07-04 11:36:34 +02:00
hermes-agent 0cf96f88be Fix API controller tests: 404 handling, JSON encoding, media filtering
Build, Lint, and Test / Build, Lint, and Test (pull_request) Failing after 1m25s
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 1m26s
- 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
2026-07-04 09:35:17 +00:00
hermes-agent 51f93c521e Fix CI branch names: master instead of main
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 12m23s
Build, Lint, and Test / Build, Lint, and Test (pull_request) Failing after 1m16s
2026-07-03 23:23:23 +00:00
hermes-agent 172c1ff264 Add JSON REST API for MCP integration
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 13m0s
- 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
2026-07-03 23:22:24 +00:00
Felix Jancso-Szabo 67d8bd5598 Fix spelling of 'Unaffected' in help texts (#838)
Noticed this while setting up pinchflat, figured I'd submit a fix.
2025-12-16 09:30:00 -08:00
Daniel Da Cunha 6cb715c1d0 Move Active Tasks to tab in Media History section (#836)
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>
2025-12-16 09:29:32 -08:00
Edward Horsey d38c26f6fd Enable overflow scroll for tables inside tabs (#822) 2025-12-16 09:28:51 -08:00
Googleplex 163e8eb8cc Update selfhosted.Dockerfile (#802) 2025-09-27 21:31:17 -07:00
Kieran Eglin 0688e880f5 Added yt=dlp for arm64 2025-09-27 10:20:33 -07:00
Kieran Eglin 4f8cba3f9c Bumped version v2025.9.26 2025-09-26 16:04:56 -07:00
Kieran 2a371c4419 [Dev] Add Deno to Dockerfiles (#801)
* 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
2025-09-26 16:04:22 -07:00
Kieran Eglin 076f2fe78b Version bump v2025.6.6 2025-06-06 14:39:32 -07:00
Kieran 68da8bc522 [Housekeeping] Dependency updates 6-Jun-2025 (#733)
* 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
2025-06-06 13:44:14 -07:00
Kieran 1cee7a19ee Made source sorting case-insensitive (#708) 2025-04-28 11:43:51 -07:00
Kieran a55f17ac5f Update the link (#697) 2025-04-10 09:39:37 -07:00
Brandon Philips f637bbd195 [Docs] Add podman to README (#686)
* 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>
2025-04-10 09:33:34 -07:00
Kieran 7f56c0c802 Better copy (#696) 2025-04-10 09:20:56 -07:00
Kieran Eglin 6d97c8c1c4 Bumped version v2025.3.17 2025-03-17 15:02:16 -07:00
Kieran 030f5fbdfe [Enhancement] Add setting to restrict filenames to ASCII characters (#660)
* Added a new column for restricting filenames

* Adds restrict-filenames to command runner

* Added UI to settings form
2025-03-17 14:58:25 -07:00
Kieran ee2db3e9b7 Stopped logging healthcheck requests (#659) 2025-03-17 14:48:07 -07:00
Kieran 4554648ba7 [Enhancement] Add download rate limiting to app settings (#646)
* Added rate limit column to settings

* Added limit_rate option to command runner

* Added rate limit to settings form
2025-03-11 15:45:56 -07:00
Kieran Eglin 0fbf810cb6 bumped version v2025.3.6 2025-03-06 14:41:36 -08:00
Kieran a97bb248e2 [Enhancement] Retry a download using cookies if doing so might help (#641)
* 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
2025-03-05 16:41:07 -08:00
Kieran ac895944a8 [Enhancement] Add option for a source to only use cookies when needed (#640)
* Updated model with new attribute

* Update app logic to use new cookie logic

* lots of tests

* Updated UI and renamed attribute

* Updated tests
2025-03-05 15:32:15 -08:00
Kieran Eglin 59f8aa69cd updating yt-dlp permissions, again 2025-03-04 11:08:02 -08:00
Kieran b790e05133 Testing yt-dlp binary permissions (#634) 2025-03-04 10:53:40 -08:00
Kieran Eglin 9953e4d316 bumped version v2025.2.20 2025-02-20 15:49:44 -08:00
Kieran b62eb2bc6b [Bugfix] Improve YouTube shorts detection for new YouTube pants (#618)
* Update youtube shorts detection to support youtube pants

* Updates a test
2025-02-20 15:49:09 -08:00
Kieran Eglin 464a595045 readme wording 2025-02-14 15:10:06 -08:00
Kieran Eglin 05f33acd78 Added note to README 2025-02-14 15:06:37 -08:00
Kieran e7adc9d68f [Enhancement] Record and display errors related to downloading (#610)
* 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
2025-02-12 10:17:24 -08:00
Kieran fe5c00dbef [Enhancement] Download failures due to videos being members-only are not immediately retried (#609) 2025-02-10 12:13:37 -08:00