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
- 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
- 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 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
* Added sleep interval to settings
* Added new sleep setting to yt-dlp runner and added tests
* Added setting for form; updated setting name
* Updated form label
* Prevented saving/updating of media items if being throttled by youtube
* Added the bot message to the list of non-retryable errors
* Fixed typo
* WIP - moved plugs; set up a new token-protected route plug
* Added a route_token column to settings model
* Hooked up token_protected_route plug to database
* Hooked up new OPML route to UI; turned RSS and OPML feed buttons into links
* Docs, tests
* Added a note about the phoenix bug
* Added OPML Endpoint for podcast rss feeds
* changed opml route and added controller test for opml endpoint
* add copy opml feed button
* add copy opml feed button - correct url
* fix html indenting
* add indentation to opml
Co-authored-by: Kieran <kieran.eglin@gmail.com>
* use convention for unused controller params
Co-authored-by: Kieran <kieran.eglin@gmail.com>
* add test for opml_sources helper function
* change opml endpoint to be more inline with the other routes
---------
Co-authored-by: robs <git@robs.social>
Co-authored-by: Kieran <kieran.eglin@gmail.com>
* WIP - started improving handling of sorting for sources index table
* WIP - Added UI to table to indicate sort column and direction
* Refactored toggle liveview into a livecomponent
* Added sorting for all table attrs
* Added pagination to the sources table
* Added tests for updated liveviews and live components
* Add tests for new helper methods
* Added fancy new CSS to my sources table
* Added size to sources table
* Adds relative div to ensure that sorting arrow doesn't run away
* Fixed da tests
* Separate tabs for pending and downloaded in media history
- closes#504
* correct query for pending state and remove unecessary assign
* correct pending where
---------
Co-authored-by: robs <git@robs.social>
* Moved quality options to their own module
* Added language and format selection to quality option builder
* [WIP] migrating tests
* Added audio_lang to media_profile table
* Renamed column; added format options and tests
* Adds UI for audio_track to the media profile form
* Adds a version string to in-app streams to help with cache busting
* [Unrelated] updated module name for existing liveview module
* Updated toggle component and moved MP index table to a liveview
* [WIP] reverted MP index table; added source count to MP index
* Moved new live table to sources index
* Added 'enabled' boolean to sources
* Got 'enabled' logic working re: downloading pending media
* Updated sources context to do the right thing when a source is updated
* Docs and tests
* Updated slow indexing to maintain its old schedule if re-enabled
* Hooked up the enabled toggle to the sources page
* [Unrelated] added direct links to various tabs on the sources table
* More tests
* Removed unneeded guard in
* Removed outdated comment
* Add option to use existing Media Profile as template for new profile
* Forgot to commit the edit form too
* Reset deletion mark on Source controller
* Add test for new preload profile feature
* mix check
* Format 'Scheduled At' in task table according to user's TZ
* Changed video preview layout to 1 column on all displays
* Made links in descriptions clickable
* Updated Copy JSON button to properly escape newline characters
* Added function for updating a media item's filepaths on-disk
* Added placeholder action to source page
* Turned the file sync into a job and properly hooked it up to the controller
* Added duration limits to source model
* Added duration limits to source form
* Added validation for min/max amounts
* Added duration checks to pending query
* Moved min/max filters up in source form
* Removed debugger
* Added 'use_cookies' column to source
* Added cookies to the source form
* Updated every command to optionally include cookies
* LOTS of tests
* Made YT cookies off by default
* [WIP] started on source deletion
* Removed unneeded test blocks
* Added marked_for_deletion_at to sources and media profiles
* Hooked up async deletion to media profiles as well
* Changed the purpose of the 'culled_at' flag. renamed some methods
* implemented new culling behaviour for source cutoff dates
* Removed culled_at flag if a media item gets redownloaded
* Updated source form
* Removed unused method
* Started capturing playlist_index on indexing pass
* Added playlist_index as a media item field
* Added playlist index to output variable templates
* Improved the way playlist_indexes are rejected on update
* Updated docs
* Undid unneeded changes
* Started adding youtube API for fast indexing
* Hooked youtube API into fast indexing
* Added youtube_api_key to settings
* Added youtube api key to settings UI
* Added tests
* Refactored the youtube api module
* More refactor
* Changed editing mode name from basic to standard
* [WIP] started on copy changes
* Updated copy
* Added compound index for updated media item table for performance
* Improved large number display on homepage
* Improved UI around large numbers
* Centered the content of homepage data cards
* Renamed migration
* [WIP] renamed and migrated upload_date column
* Refactored yt-dlp media module
* Refactored parse_upload_date
* Refactored media item upload_date_index
* Got media tests running
* Refactored media item table live
* Cleaned up the stragglers
* Fixed old oversight re: original_url