Add the non-yt-dlp ingest path so a user-uploaded file joins the same download
library and inherits its function set. Any file type is accepted: media
(video/audio) gets the full set (metadata, share, play/edit), a generic file
(pdf/zip/docx/…) is download-only.
- MediaAsset.media_kind ("video"|"audio"|"file") — the stored discriminator that
gates library actions. Set at every finalize (download probe, editor carries the
source's kind, upload probe); consolidates the ad-hoc audio-detect that lived only
in links.py into one invariant (downloads.mediakind.derive). Migration 0076 adds
the column + backfills existing rows.
- downloads/upload.py: ingest_upload probes the file (ffprobe → codecs/dims/duration),
places it in a per-user .uploads tree, and creates an already-ready asset + done job
(the same cache-hit shortcut enqueue uses). Uploads never expire (irreplaceable).
- POST /api/downloads/upload: streaming multipart with the per-file cap
(download_upload_max_bytes, default 500 MiB) enforced on actual bytes read; quota
charges the known size up front (quota.check_upload).
- Security: a generic file is always served force-download (attachment +
application/octet-stream) on both the in-app and public endpoints, so uploaded
HTML/SVG can't execute inline. Edit + redownload reject non-media / upload sources.
- python-multipart added (first multipart endpoint in the app).
28 lines
1.2 KiB
Plaintext
28 lines
1.2 KiB
Plaintext
fastapi>=0.115,<1.0
|
|
# Multipart form parsing — required by Starlette/FastAPI to accept file uploads (UploadFile/Form).
|
|
# The download center's local-file Upload (E7) is the only multipart endpoint in the app.
|
|
python-multipart>=0.0.9,<1.0
|
|
uvicorn[standard]>=0.30,<1.0
|
|
sqlalchemy>=2.0,<2.1
|
|
psycopg[binary]>=3.2,<4.0
|
|
alembic>=1.13,<2.0
|
|
pydantic>=2.7,<3.0
|
|
pydantic-settings>=2.3,<3.0
|
|
authlib>=1.3,<2.0
|
|
httpx>=0.27,<1.0
|
|
feedparser>=6.0,<7.0
|
|
apscheduler>=3.10,<4.0
|
|
py3langid>=0.3,<1.0
|
|
itsdangerous>=2.1,<3.0
|
|
cryptography>=50.0.0,<51
|
|
argon2-cffi>=23.1,<26
|
|
# Download center: yt-dlp does the extraction/download; ffmpeg (OS-level in the Dockerfile)
|
|
# does the merge + postprocessing. The [default] extra pulls yt-dlp-ejs (the challenge-solver
|
|
# scripts Deno runs for YouTube's n-signature). yt-dlp is release-often (YouTube changes), so
|
|
# keep the floor loose and bump it when extraction breaks.
|
|
yt-dlp[default]>=2025.5.22
|
|
# PO Token provider plugin: talks to the bgutil sidecar (brainicism/bgutil-ytdlp-pot-provider)
|
|
# to mint YouTube Proof-of-Origin tokens on demand, bypassing "confirm you're not a bot" and
|
|
# unlocking high-quality formats. Pin to match the sidecar image tag (versions must align).
|
|
bgutil-ytdlp-pot-provider==1.3.1
|