feat: PeerTube integration — alternate audio/video labels, FilePond pools, shared SMTP credentials, channel by name, test button, resumable upload, embed improvements, fix alt labels/curl_close/deprecation

This commit is contained in:
Pontoporeia
2026-05-11 10:47:33 +02:00
parent 28ef35dce5
commit 83a5a508ea
18 changed files with 748 additions and 261 deletions

23
TODO.md
View File

@@ -14,6 +14,29 @@
- [x] **Migration idempotency**`CREATE INDEX` / `CREATE TRIGGER` / `CREATE VIEW` now use `IF NOT EXISTS` in schema.sql and generate-schema.py; migrate.sh no longer fails on re-run
- [ ] **Database readonly** — intermittent permission issue after deploy (added deploy-nginx recipe; permissions should be fixed by --chown + deploy-server.sh)
## PeerTube Alternate Labels & FilePond Pools
- [x] Add `peertube_video_label` and `peertube_audio_label` columns (migration 029)
- [x] Update PeerTubeService getSettings/updateSettings for new fields
- [x] Add label fields to parametres.php admin form
- [x] Handle label saving in admin/actions/settings.php
- [x] Uncomment video/audio slots in fichiers-fragment.php with FilePond pools when PeerTube enabled
- [x] Register `peertube_video` / `peertube_audio` queue types in file-upload-filepond.js
- [x] Update handlePeerTubeUpload → handlePeerTubeQueueFiles in both create/edit controllers
- [x] When PeerTube active, restrict TFE pool to PDF/images/VTT/archives only (no video/audio)
- [x] Add HTMX swap attributes to Vidéo/Audio format checkboxes for live toggling
- [x] Store PeerTube uploads as `peertube_ids:{uuid}` in thesis_files.file_path
- [x] Create `templates/partials/peertube-embed.php` iframe embed template
- [x] Render PeerTube embeds in public thesis view (tfe.php)
- [x] Handle PeerTube files in admin recapitulatif.php and fichiers-fragment.php
- [x] Shared SMTP credentials — remove username/password from peertube_settings (migration 031)
- [x] PeerTubeService reads credentials from SmtpRelay
- [x] OAuth client_id/secret fetched on-demand and cached in-memory (no DB storage)
- [x] Resumable upload protocol (POST init + PUT chunks) in PeerTubeService::upload()
- [x] Admin recapitulatif: show real PeerTube watch links (public/unlisted only)
- [x] Optimize public thesis view: load PeerTube instance URL once before file loop
- [ ] Test end-to-end: activate PeerTube, set labels, submit form with video/audio files
## SQLite Backup & Data Integrity (docs/backup-plan.md)
### Phase 1 — WAL Mode