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
- 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
* Added a command for updating yt-dlp
* Added a yt-dlp update worker to run daily
* Added a new file that runs post-boot when the app is ready to serve requests; put yt-dlp updater in there
* Updated config to expose the current env globally; updated startup tasks to not run in test env
* Removes unneeded test code
* Updated default job priorities for downloading queue
* Added the ability to set priority to various downloading helpers
* Sets sources to fast index on creation
* Added prometheus to deps list
* WIP - screwing around with Prometheus and grafana
* Added basic prometheus config
* Updated docs in prom_ex module
* Updated README
* [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
* Added ability to specify overwrite behaviour when downloading media
* Added helper for redownloading media items
* renamed media redownload worker to disambiguate it from similarly named methods
* Added new redownload option to source actions dropdown
* Refactored MediaQuery to use a __using__ macro
* docs
* First pass at cutting down image size
* Made selfhosted docker work multiplatform
* Updated compile-time value to be runtime
* Fixed issue with tzdata file permissions
* Applied better fix for tz issue
* Added basic history table to homepage
* Improved homepage history query
* Set table to use 24h time
* Added timezone support
* Updated README to reflect new TZ stuff
* Namespaced notification modules under lifecycle
* Added a JSON encoder for all the main model types
* Added startup task to create user script file
* Hook up user script event to media download
* Hooked up media deletion user script
* Added jq to docker deps
* Updated README
* [Enhancement] Adds ability to stop media from re-downloading (#159)
* Added column
* Added methods for ignoring media items from future download
* Added new deletion options to controller and UI
* Added controller actions and UI for editing a media item
* Added column to sources
* Added retention period to form
* [WIP] getting retention methods in place
* Hooked up retention worker
* Added column and UI to prevent automatic deletion
* Docs
* Removed unused backfill worker
* Added edit links to media item tabs on source view
* Clarified form wording
* Form wording (again)
* Removes header to allow embedding in frame
* Escaped links in podcast RSS builder
* Turned homepage sections into clickable links
* Enabled live dashboard in all ENVs
* Ensured download worker always returns a 2-member tuple
* Add media streaming (#108)
* [WIP] set up streaming route
* Added UUID to sources and media items
* Added media preview to MI show page
* Added plug to strip file extensions
* [VERY WIP] basic podcast RSS setup
* [WIP] got basic podcast RSS working
* [WIP] more expanding on RSS
* Comment
* [WIP] Working on refactoring feed
* Added UUID backfill to a migration
* [WIP] Moar refactoring
* [WIP] Adding UI for getting RSS feed
* Many tests
* Added conditional routing for feed URLs
* Removed the need for url_base to be set
* Updated preset name
* Rendered certain fields HTML-safe; Added logging to confirm range request support
* Fixed incorrect scheme issue
* Updated env var
* Updated other UI to use dropdown
* removed commented code
* Generate rss feeds (#123)
* Added plug to strip file extensions
* [VERY WIP] basic podcast RSS setup
* [WIP] got basic podcast RSS working
* [WIP] more expanding on RSS
* [WIP] Working on refactoring feed
* Added UUID backfill to a migration
* [WIP] Moar refactoring
* [WIP] Adding UI for getting RSS feed
* Many tests
* Added conditional routing for feed URLs
* Removed the need for url_base to be set
* Updated preset name
* Rendered certain fields HTML-safe; Added logging to confirm range request support
* Fixed incorrect scheme issue
* Updated env var
* Updated other UI to use dropdown
* removed commented code
* docs
* Added unique index to UUID fields
* Add media profile presets (#85)
* Added presets for output templates
* Added presets for the entire media profile form
* Append `-thumb` to thumbnails when downloading (#87)
* Appended -thumb to thumbnails when downloading
* Added code to compensate for yt-dlp bug
* Squash all the commits from the other branch bc I broke things (#88)
* [WIP] break out a few contexts, start refactoring fast index modules
* [WIP] more contexts, this time around slow indexing and downloads
* [WIP] got all tests passing
* [WIP] Added moduledocs
* Built a genserver to rename old jobs on boot
* Added a module naming check; moved things around
* Fixed specs
* Made method to getting singular media details; Renamed other related method
* Takes a fun and flirty digression to remove abstractions around yt-dlp since I'm 100% committed to using it exclusively
* Removed commented test code
* Lays the groundwork for fast indexing
* Added module for working with youtube RSS feed
* Added methods to kick off indexing workers from RSS response
* Improve short detection (#59)
* Made media attribute-related yt-dlp calls return a struct
* Added shorts attribute to media items
* Added ability to discern a short from yt-dlp response
* Updated search to use new shorts attribute
* Fast index UI (#63)
* Added fast_index field and adds it to source form
* Added fast indexing to source changeset operations
* Added fast indexing worker and updated other modules to start using it
* Handled fast index worker on source update
* Add support modals (#65)
* Added fast indexing upgrade modal
* Improved modal on smaller screens
* Updated links to work again
* Added donation modal
* Reverted source fast index to 15 minutes
* Removed unneeded HTML attributes from old alpine approach
* Updated config path to specify metadata storage path
* Removed metadata column from DB, replacing it with filepath columns
* Updated app to store compressed metadata; automatically download thumbnails
* Ensured metadata is deleted when other files are deleted
* Updated docs
* Added inets to application start so http calls work in prod
* Updated project to use sqlite
* Edited migrations directly because I fear no man
* Updated search functions and tests to work with sqlite
* Updated build tools to remove postgres